Commit Graph

39 Commits

Author SHA1 Message Date
R. Tyler Croy 17b9e4fd0d Merge pull request #10 from jhoblitt/maint/tests
fix rspec + cucumber tests
2016-03-29 13:45:32 -07:00
Joshua Hoblitt e796725a15 fix rspec deprecation warnings in cucumber setup 2016-03-26 10:28:28 -07:00
Joshua Hoblitt c8b0acb231 update arbua config syntax 2016-03-26 10:27:46 -07:00
Joshua Hoblitt 34830ab095 replace ci_reporter gem with ci_reporter_rspec
ci_reporter 2.x framework now uses per test platform gems.
2016-03-26 10:05:27 -07:00
Joshua Hoblitt f42bc1e549 fix rspec 3 compatibility issues missed by transpec 2016-03-26 10:00:28 -07:00
Joshua Hoblitt 9b80027f9e Convert specs to RSpec 3.4.4 syntax with Transpec
This conversion is done by Transpec 3.2.2 with the following command:
    transpec -f

* 17 conversions
    from: it { should ... }
      to: it { is_expected.to ... }

* 8 conversions
    from: obj.should_receive(:message)
      to: expect(obj).to receive(:message)

* 4 conversions
    from: it { should_not ... }
      to: it { is_expected.not_to ... }

* 3 conversions
    from: obj.stub(:message)
      to: allow(obj).to receive(:message)

* 1 conversion
    from: be_false
      to: be_falsey

* 1 conversion
    from: be_true
      to: be_truthy

For more details: https://github.com/yujinakayama/transpec#supported-conversions
2016-03-26 09:57:28 -07:00
Joshua Hoblitt 8d15089639 remove vagrant gems
Vagrant is overly picky about bundler versions.
2016-03-26 09:55:50 -07:00
Joshua Hoblitt 5845e819f7 remove debugger[-pry] gems (dead) 2016-03-26 09:43:49 -07:00
Joshua Hoblitt b65dce8a4d add rspec-its gem 2016-03-26 09:42:31 -07:00
R. Tyler Croy 484a103604 Add support for searching by title
References #4
2014-04-03 19:30:46 -07:00
R. Tyler Croy 6cb694779e Add support for resolving dependencies and computing an installation list
There's still more work to be done around version checking here, but this is good!

This more or less fixes #3
2014-03-23 20:22:30 -07:00
R. Tyler Croy 842b6e272c Add support for installing multiple plugins in one invocation of `jpm install`
References #2
2014-03-23 19:10:08 -07:00
R. Tyler Croy 1de29cbd7b First pass at installing plugins which have no dependencies
This commit also includes a number of errorcases from the CLI side of things,
but doesn't actually include much error handling inside of the business logic.

Fixes #2
2014-03-23 17:01:22 -07:00
R. Tyler Croy 01d0e18a7a Properly exit out early if `update` with `--offline` is used 2014-03-23 16:28:10 -07:00
R. Tyler Croy a9381d35ad Expose the status code properly out to the Aruba::InProcess runner 2014-03-23 16:27:25 -07:00
R. Tyler Croy 9d6378f3c8 copypastabetterplz 2014-03-23 16:27:01 -07:00
R. Tyler Croy 802b0bdcb8 Add some cucumber profiles 2014-03-23 16:24:25 -07:00
R. Tyler Croy 765d2216b4 Avoid overwriting an existing update-center.json if it exists
That is, unless you say 'y' or you --force it. Tested the interactive query
part outside of Aruba since it's a PITA to make it work with Thor and
Aruba::InProcess. Verified on an actual machine though:

    ubuntu@ip-10-226-175-124:~$ jpm update
    A version of the repo is already on disk, overwrite? [y, n] n
    ubuntu@ip-10-226-175-124:~$ sudo jpm update
    A version of the repo is already on disk, overwrite? [y, n] y
    Fetching <http://updates.jenkins-ci.org/update-center.json> ...

    Wrote to /var/lib/jenkins/update-center.json
    ubuntu@ip-10-226-175-124:~$
2014-03-23 15:22:57 -07:00
R. Tyler Croy 86026e6286 Move the Aruba helper code into it's own file and fix our invocations of it 2014-03-23 15:21:34 -07:00
R. Tyler Croy 2283803f0e Allow `jpm update` to fetch an update center from a non-standard source 2014-03-23 14:09:09 -07:00
R. Tyler Croy 2929d13022 Add #require_jenkins! to make it easier to reason about CLI flow control and requiring Jenkins
The things that will likely need to require Jenkins:

  * `update` without a --save/--ouput option
  * `install`
  * `upgrade`
  * `list`
2014-03-23 14:09:09 -07:00
R. Tyler Croy 5fb338d2d9 Add the verbose and offline CLI options for later
At some point I'll need to expose these down into the guts
2014-03-23 13:48:42 -07:00
R. Tyler Croy 3715ed27f4 Add 'paint' gem as a dependency for console colors 2014-03-23 13:48:39 -07:00
R. Tyler Croy 6a794c3f61 Add simple (early) support for `jpm update` to fetch and write out an update-center.json
Tested this on a physical machine with no pre-existing update-center.json, wooo

References #6
2014-03-23 13:06:23 -07:00
R. Tyler Croy 2d919a8a53 Fix a stupid issue when running `jpm list`
On a real machine I found this stupid exception:

    ubuntu@ip-10-226-175-124:/vagrant/pkg$ jpm list
    /var/lib/gems/1.8/gems/jpm-1.0.0/lib/jpm.rb:32:in `has_plugins?': undefined method `<=' for #<Array:0x7fbb402b3240> (NoMethodError)
            from /var/lib/gems/1.8/gems/jpm-1.0.0/lib/jpm/cli.rb:11:in `list'
            from /var/lib/gems/1.8/gems/thor-0.19.0/lib/thor/command.rb:27:in `__send__'
            from /var/lib/gems/1.8/gems/thor-0.19.0/lib/thor/command.rb:27:in `run'
            from /var/lib/gems/1.8/gems/thor-0.19.0/lib/thor/invocation.rb:126:in `invoke_command'
            from /var/lib/gems/1.8/gems/thor-0.19.0/lib/thor.rb:359:in `dispatch'
            from /var/lib/gems/1.8/gems/thor-0.19.0/lib/thor/base.rb:440:in `start'
            from /var/lib/gems/1.8/gems/jpm-1.0.0/bin/jpm:14
            from /usr/local/bin/jpm:19:in `load'
            from /usr/local/bin/jpm:19
2014-03-23 13:06:23 -07:00
R. Tyler Croy b228ff31ad Print a newline between plugin short form descriptions
Otherwise a `jpm search git` looks like a big wall of text
2014-03-23 13:06:23 -07:00
R. Tyler Croy 38547ce5fa Properly handle short-form plugin descriptions for plugins without labels 2014-03-23 12:55:03 -07:00
R. Tyler Croy e13223118c Implement a basic name-based search for an existing update-center.json on disk
This is only searching based on names right now

References #4
2014-03-23 11:48:28 -07:00
R. Tyler Croy 64462ee68e Ignore all my local vagrant files 2014-03-23 11:31:48 -07:00
R. Tyler Croy 0ed8a05c11 Start fleshign out a Plugin and Catalog class respectively
The Plugin class will encapsulate the meta-data for a single plugin record from
the udpate-center, while catalog is intended to be the primary mapping of the
update-center file as a whole.

I'm not sure yet if the Catalog class should be resolving the plugins on disk
and what's available
2014-03-23 11:03:42 -07:00
R. Tyler Croy e3848c3919 Include the debugger gems when testing on MRI only 2014-03-23 11:03:16 -07:00
R. Tyler Croy 3027aa1b5e Bring over the code for loosely parsing .jar file MANIFEST.MF files 2014-03-23 09:13:19 -07:00
R. Tyler Croy f0caf2d464 Add the MIT license for the gem 2014-03-20 22:05:23 -07:00
R. Tyler Croy eb8b0352a9 Implement all of `jpm list` with a simple text only output format
This brings over some of the initial plugin listing code from the
puppet-jenkins module
2014-03-20 22:03:02 -07:00
R. Tyler Croy 89aaeb8979 Starting to flesh out the command line interface for the jpm executable
This commit includes some code to rnu the `jpm` CLI in the same Ruby process,
which will allow us to mock things out properly instead of creating a fake
JENKINS_HOME on the file system, yay
2014-03-20 21:23:52 -07:00
R. Tyler Croy 8390e4d5c9 Describe the project a little bit more 2014-03-14 08:30:49 -07:00
R. Tyler Croy 3319078a10 Add a simple gemspec (pretty bare for now) 2014-03-14 08:28:32 -07:00
R. Tyler Croy 69112111d5 Add basic gem bits 2014-03-13 21:20:02 -07:00
R. Tyler Croy 59632c71f9 Initial commit 2014-03-13 19:14:30 -07:00