bundler-reorganizer 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 15f45e63b4e8b8f788a3fb25d41e28fa3b9b1674
4
- data.tar.gz: 8ea4fb75fc5e2fc5f246c531b2a7ca02f51d445e
3
+ metadata.gz: fb01d1dd88e7ecce32e0ab51ddfba9b48f6338d9
4
+ data.tar.gz: a5a04610bcd18980122f40020d4ef4b4dc87ea00
5
5
  SHA512:
6
- metadata.gz: 415738442d951cef0d6247c0c20cbb8064704a8ace8b360672552e3339741564a8980b3d5c0e5019d0a7707cc3d173b9d0e91954e81d479d12ecbaeb294a03e6
7
- data.tar.gz: 350e31dc57490a059eac310b21fe76509220f233e973c8149370f2b1c554927eb1c77117afa4cd2f196edb6902035f02cbeb9b5a00a9e55de5057a28cc6a8bef
6
+ metadata.gz: 18fca02c3ff6e050e367562e09212742f4c3d0f5a82071688bf0b26f306791d2d6d3882a9a091ba28360a832632b57a941a4e0ab6dc49e19f8a7b824932c16a9
7
+ data.tar.gz: 6fd81e4bcca4dc8aab8fd276e0d62077b5d04f9bfbce9450b23959e79c386b9279a62231a2371c1fe322d69eff70065f12ba9a2856d06ee6a0050ed036bcef9a
data/README.md CHANGED
@@ -24,7 +24,7 @@ end
24
24
  ## Usage
25
25
 
26
26
  ```bash
27
- $ bundler-reorganizer reorganize path/to/Gemfile
27
+ $ bundler-reorganizer path/to/Gemfile
28
28
  ```
29
29
 
30
30
  #### (optional) `--output path/to/reorganized/Gemfile`
@@ -35,7 +35,7 @@ aliased to `-o`
35
35
 
36
36
  example:
37
37
  ```bash
38
- $ bundler-reorganizer reorganize path/to/original/Gemfile --output path/to/reorganized/Gemfile
38
+ $ bundler-reorganizer path/to/original/Gemfile --output path/to/reorganized/Gemfile
39
39
  ```
40
40
 
41
41
  ## Installation
@@ -2,25 +2,25 @@ require 'thor'
2
2
 
3
3
  module Bundler
4
4
  module Reorganizer
5
- class CLI < Thor
5
+ class CLI < Thor::Group
6
6
  DEFAULT_GROUP = [:default]
7
7
  attr_accessor :sources, :rubies, :groups, :current_group
8
8
 
9
- desc "reorganize PATH_TO_GEMFILE [OPTIONS]", "reorganize Gemfile into groups of gems"
10
- option :output, desc: 'path to write output of reorganized Gemfile', aliases: '-o'
11
- def reorganize(gemfile_path)
9
+ desc "reorganize Gemfile into groups of gems"
10
+ argument :gemfile_path, :banner=>"path/to/Gemfile"
11
+ class_option :output, desc: 'path to write output of reorganized Gemfile', aliases: '-o'
12
+ def reorganize
12
13
  @sources = []
13
14
  @rubies = []
14
15
  @groups = {}
15
16
 
16
- parse gemfile_path
17
- output_gemfile gemfile_path
17
+ parse_gemfile
18
+ output_gemfile
18
19
  end
19
- default_command :reorganize
20
20
 
21
21
  private
22
22
 
23
- def output_gemfile(gemfile_path)
23
+ def output_gemfile
24
24
  output_path = options[:output] || gemfile_path
25
25
  output_buffer = File.open(output_path, 'w')
26
26
  say "Writing reorganized Gemfile to: #{output_path}"
@@ -77,9 +77,9 @@ module Bundler
77
77
  object.is_a?(Array) ? object : [object]
78
78
  end
79
79
 
80
- def parse(path)
81
- say "Parsing Gemfile: #{path}"
82
- contents = File.read path
80
+ def parse_gemfile
81
+ say "Parsing Gemfile: #{gemfile_path}"
82
+ contents = File.read gemfile_path
83
83
  instance_eval contents
84
84
  end
85
85
  end
@@ -1,5 +1,5 @@
1
1
  module Bundler
2
2
  module Reorganizer
3
- VERSION = "1.0.0"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundler-reorganizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Sonnek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-02 00:00:00.000000000 Z
11
+ date: 2014-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor