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 +4 -4
- data/README.md +2 -2
- data/lib/bundler/reorganizer/cli.rb +11 -11
- data/lib/bundler/reorganizer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb01d1dd88e7ecce32e0ab51ddfba9b48f6338d9
|
4
|
+
data.tar.gz: a5a04610bcd18980122f40020d4ef4b4dc87ea00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
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
|
10
|
-
|
11
|
-
|
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
|
-
|
17
|
-
output_gemfile
|
17
|
+
parse_gemfile
|
18
|
+
output_gemfile
|
18
19
|
end
|
19
|
-
default_command :reorganize
|
20
20
|
|
21
21
|
private
|
22
22
|
|
23
|
-
def output_gemfile
|
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
|
81
|
-
say "Parsing Gemfile: #{
|
82
|
-
contents = File.read
|
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
|
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.
|
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-
|
11
|
+
date: 2014-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|