rocktumbler 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +4 -2
- data/README.md +89 -3
- data/Rakefile +11 -1
- data/bin/tumble +1 -1
- data/lib/rocktumbler/gem.rb +59 -31
- data/lib/rocktumbler/gemfile.rb +7 -8
- data/lib/rocktumbler/group.rb +11 -8
- data/lib/rocktumbler/group_filter.rb +15 -6
- data/lib/rocktumbler/option.rb +54 -0
- data/lib/rocktumbler/tumbler.rb +20 -10
- data/lib/rocktumbler/version.rb +2 -1
- data/lib/rocktumbler.rb +3 -1
- data/rocktumbler.gemspec +14 -11
- metadata +20 -7
- data/rocktumbler-0.1.0.gem +0 -0
- data/rocktumbler-0.1.1.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3672a2966e07f824bf93a4fa47783b2a7e6f9db8
|
4
|
+
data.tar.gz: e465ca4f509cc7e1c3cd7440864869e11c6c6243
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14d46c2c1a4a47cea7313a327a4dcbfe1823560922b6d87871cba6d7fe534a794038e9775752e941c3886f3e70aa2c27f446d9c1434a3d340e0ab11d677182eb
|
7
|
+
data.tar.gz: 9d8850f4559bff799ec5e35afe9e3167fdb041d418bb0d283c539361e3663e8249677e44c9d7c7120e450b3df91a5c65040beb23b1ab44749a2223c03c478bac
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,45 @@
|
|
1
1
|
# Rocktumbler
|
2
2
|
|
3
|
-
|
3
|
+
[](https://travis-ci.org/simonreed/rocktumbler)
|
4
|
+
|
5
|
+
Rocktumbler is a gem that will take your existing Gemfile and ensure that it remains formatted and consistent.
|
6
|
+
|
7
|
+
It enforces a style to your Gemfile to make it easy to read and understand your Gemfile. Including :
|
8
|
+
|
9
|
+
* Single quotes.
|
10
|
+
* Ruby 1.9 hash syntax.
|
11
|
+
* 2 Space Indentation.
|
12
|
+
* Sort gems alphabetically.
|
13
|
+
* Organise groups around the block form.
|
14
|
+
* Add Gem description and url, making it easier to document what a gem is used for (optional).
|
15
|
+
|
16
|
+
It will produce a Gemfile that is compliant with the default config for Rubocop.
|
17
|
+
|
18
|
+
## Example
|
19
|
+
|
20
|
+
Before
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
source "https://rubygems.org"
|
24
|
+
gem 'pg'
|
25
|
+
gem "rocktumbler"
|
26
|
+
gem 'pry', :require => 'pry', :group => 'development'
|
27
|
+
gem 'rubocop', group: 'development'
|
28
|
+
```
|
29
|
+
|
30
|
+
After
|
31
|
+
|
32
|
+
```ruby
|
33
|
+
source 'https://rubygems.org'
|
34
|
+
|
35
|
+
gem 'pg'
|
36
|
+
gem 'rocktumbler'
|
37
|
+
|
38
|
+
group :development do
|
39
|
+
gem 'pry', require: 'pry'
|
40
|
+
gem 'rubocop'
|
41
|
+
end
|
42
|
+
```
|
4
43
|
|
5
44
|
## Installation
|
6
45
|
|
@@ -14,7 +53,54 @@ And then execute:
|
|
14
53
|
|
15
54
|
$ tumble
|
16
55
|
|
17
|
-
This will then rewrite your Gemfile
|
56
|
+
This will then rewrite your Gemfile giving you a fresh, clean and consistent Gemfile.
|
57
|
+
|
58
|
+
## CLI Options
|
59
|
+
|
60
|
+
```
|
61
|
+
Usage: tumble [options]
|
62
|
+
|
63
|
+
Specific options:
|
64
|
+
-i, --info Display gem info comment.
|
65
|
+
-d, --homepage Display gem homepage comment.
|
66
|
+
-s, --skip-write Skip writing of Gemfile
|
67
|
+
|
68
|
+
Common options:
|
69
|
+
-h, --help Show this message
|
70
|
+
--version Show version
|
71
|
+
```
|
72
|
+
|
73
|
+
### Gem Info Comments
|
74
|
+
|
75
|
+
If you wish to display Gem info within your Gemfile to aid readablility you can specify the `-i` or `--info` option on the CLI. The gem homepage url can be added with the `-d` or `--homepage` option.
|
76
|
+
|
77
|
+
`tumble --info --homepage`
|
78
|
+
|
79
|
+
will give you :
|
80
|
+
|
81
|
+
```ruby
|
82
|
+
source 'https://rubygems.org'
|
83
|
+
|
84
|
+
# Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/]
|
85
|
+
# https://bitbucket.org/ged/ruby-pg
|
86
|
+
gem 'pg'
|
87
|
+
# Polish your Gemfile to make sure it remains consistent.
|
88
|
+
# https://github.com/simonreed/rocktumbler
|
89
|
+
gem 'rocktumbler'
|
90
|
+
|
91
|
+
group :development do
|
92
|
+
# An IRB alternative and runtime developer console
|
93
|
+
# http://pryrepl.org
|
94
|
+
gem 'pry', require: 'pry'
|
95
|
+
# Automatic Ruby code style checking tool.
|
96
|
+
# http://github.com/bbatsov/rubocop
|
97
|
+
gem 'rubocop'
|
98
|
+
end
|
99
|
+
```
|
100
|
+
|
101
|
+
## Bundler integration
|
102
|
+
|
103
|
+
All generated Gemfiles are parsed and verified against the original Gemfile using Bundler to ensure the Bundler configuration remains unchanged. No need to worry about Gems going missing.
|
18
104
|
|
19
105
|
## Development
|
20
106
|
|
@@ -22,7 +108,7 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
|
22
108
|
|
23
109
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
24
110
|
|
25
|
-
TODO: Add
|
111
|
+
TODO: Add more test coverage!
|
26
112
|
|
27
113
|
## Contributing
|
28
114
|
|
data/Rakefile
CHANGED
@@ -1,2 +1,12 @@
|
|
1
|
-
|
1
|
+
# encoding: utf-8
|
2
2
|
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
require 'bundler/gem_tasks'
|
6
|
+
|
7
|
+
require 'rake'
|
8
|
+
require 'rspec/core'
|
9
|
+
require 'rspec/core/rake_task'
|
10
|
+
RSpec::Core::RakeTask.new(:spec)
|
11
|
+
|
12
|
+
task default: [:spec]
|
data/bin/tumble
CHANGED
data/lib/rocktumbler/gem.rb
CHANGED
@@ -1,28 +1,48 @@
|
|
1
1
|
require_relative 'exceptions'
|
2
2
|
|
3
3
|
module Rocktumbler
|
4
|
+
# The Gem is a class responsible for handling outputting info on a Rubygem
|
4
5
|
class Gem
|
5
|
-
def initialize(
|
6
|
-
@
|
6
|
+
def initialize(gem_dep, opts)
|
7
|
+
@gem_dep = gem_dep
|
8
|
+
@opts = opts
|
7
9
|
end
|
8
10
|
|
9
|
-
def print(prepend=
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
str += "#{prepend}gem '#{@gem_dependency.name}'"
|
14
|
-
str += ",'#{@gem_dependency.requirement}'" unless @gem_dependency.requirement.none?
|
15
|
-
str += generate_gem_source(@gem_dependency.source.options) if @gem_dependency.source
|
16
|
-
str += generate_require(@gem_dependency.autorequire) if @gem_dependency.autorequire
|
17
|
-
str += "\n\n"
|
11
|
+
def print(prepend = '')
|
12
|
+
max_length = 80 - 2 - prepend.chars.count
|
13
|
+
gem_info = retrieve_gem_information(@gem_dep.name, max_length)
|
14
|
+
formatted_line(prepend, gem_info)
|
18
15
|
end
|
19
16
|
|
20
17
|
private
|
21
18
|
|
22
|
-
def
|
19
|
+
def formatted_line(prepend, gem_info)
|
20
|
+
if @opts.gem_info
|
21
|
+
str = "#{prepend}# #{gem_info.summary.strip}\n"
|
22
|
+
else
|
23
|
+
str = ''
|
24
|
+
end
|
25
|
+
str += format_homepage(gem_info.homepage, prepend) if @opts.gem_homepage
|
26
|
+
str += "#{prepend}gem '#{@gem_dep.name}'"
|
27
|
+
str += format_requirement || ''
|
28
|
+
str += format_source
|
29
|
+
str += format_require(@gem_dep.autorequire)
|
30
|
+
str
|
31
|
+
end
|
32
|
+
|
33
|
+
def format_requirement
|
34
|
+
", '#{@gem_dep.requirement}'" unless @gem_dep.requirement.none?
|
35
|
+
end
|
36
|
+
|
37
|
+
def format_homepage(homepage, prepend)
|
38
|
+
(homepage.nil?) ? "#{prepend}#\n" : "#{prepend}# #{homepage}\n"
|
39
|
+
end
|
40
|
+
|
41
|
+
def format_require(autorequire)
|
42
|
+
return '' unless autorequire
|
23
43
|
if autorequire.count > 1
|
24
44
|
# Array.to_s will output double quotes so we gsub them to singles.
|
25
|
-
return ", require: #{autorequire.to_s.
|
45
|
+
return ", require: #{autorequire.to_s.tr('"', '\'')}"
|
26
46
|
elsif autorequire.first.is_a?(String)
|
27
47
|
return ", require: '#{autorequire.first}'"
|
28
48
|
else
|
@@ -30,33 +50,41 @@ module Rocktumbler
|
|
30
50
|
end
|
31
51
|
end
|
32
52
|
|
33
|
-
def
|
34
|
-
|
35
|
-
|
53
|
+
def format_source
|
54
|
+
return '' unless @gem_dep.source
|
55
|
+
source_options = @gem_dep.source.options
|
56
|
+
%w(git github git_source source path gist bitbucket).each do |source_type|
|
57
|
+
next unless source_options[source_type]
|
58
|
+
return ", #{source_type}: '#{source_options[source_type]}'"
|
36
59
|
end
|
37
60
|
end
|
38
61
|
|
39
|
-
def retrieve_gem_information(gem_name)
|
40
|
-
bundled_gem = Bundler.definition.specs.
|
62
|
+
def retrieve_gem_information(gem_name, max_length = 80)
|
63
|
+
bundled_gem = Bundler.definition.specs.find { |g| g.name == gem_name }
|
41
64
|
if bundled_gem
|
42
|
-
OpenStruct.new(summary: bundled_gem.summary.slice(0,
|
65
|
+
OpenStruct.new(summary: bundled_gem.summary.slice(0, max_length),
|
66
|
+
homepage: bundled_gem.homepage)
|
43
67
|
else
|
44
|
-
|
68
|
+
rubygems_gem_info(gem_name, max_length)
|
45
69
|
end
|
46
70
|
end
|
47
71
|
|
48
|
-
def
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
end
|
72
|
+
def rubygems_gem_info(gem_name, max_length = 80)
|
73
|
+
gem_info = rubygems_gem_info_json(gem_name)
|
74
|
+
OpenStruct.new(summary: gem_info['info'].slice(0, max_length),
|
75
|
+
homepage: gem_info['homepage_uri'])
|
76
|
+
rescue OpenURI::HTTPError => e
|
77
|
+
if e.message == '404 Not Found'
|
78
|
+
raise GemInformationNotFoundError,
|
79
|
+
"No details found locally or on rubygems for '#{gem_name}'"
|
80
|
+
else
|
81
|
+
raise e
|
59
82
|
end
|
60
83
|
end
|
84
|
+
|
85
|
+
def rubygems_gem_info_json(gem_name)
|
86
|
+
json = open("https://rubygems.org/api/v1/gems/#{gem_name}.json").read
|
87
|
+
JSON.parse(json)
|
88
|
+
end
|
61
89
|
end
|
62
90
|
end
|
data/lib/rocktumbler/gemfile.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require_relative 'exceptions'
|
2
2
|
|
3
3
|
module Rocktumbler
|
4
|
+
# The Gemfile is a class responsible for reading and parsing a Gemfile
|
4
5
|
class Gemfile
|
5
6
|
attr_accessor :ruby, :source
|
6
7
|
|
@@ -12,27 +13,25 @@ module Rocktumbler
|
|
12
13
|
end
|
13
14
|
|
14
15
|
def read_contents
|
15
|
-
gemfile = File.open(@gemfile_location,'r')
|
16
|
+
gemfile = File.open(@gemfile_location, 'r')
|
16
17
|
str = gemfile.read
|
17
18
|
gemfile.close
|
18
19
|
str
|
19
20
|
end
|
20
21
|
|
21
22
|
def print_source_and_ruby
|
22
|
-
str =
|
23
|
-
str += "#{@source.
|
24
|
-
str += "#{@ruby.
|
23
|
+
str = ''
|
24
|
+
str += "#{@source.tr('\"', '\'')}\n" if @source
|
25
|
+
str += "\n#{@ruby.tr('\"', '\'')}\n" if @ruby
|
25
26
|
str
|
26
27
|
end
|
27
28
|
|
28
29
|
def parse_ruby
|
29
|
-
/^(ruby.*)/.match(@gemfile_contents)
|
30
|
-
$1
|
30
|
+
/^(ruby.*)/.match(@gemfile_contents)[1] if @gemfile_contents =~ /^(ruby.*)/
|
31
31
|
end
|
32
32
|
|
33
33
|
def parse_source
|
34
|
-
/^(source.*)/.match(@gemfile_contents)
|
35
|
-
$1
|
34
|
+
/^(source.*)/.match(@gemfile_contents)[1]
|
36
35
|
end
|
37
36
|
end
|
38
37
|
end
|
data/lib/rocktumbler/group.rb
CHANGED
@@ -1,20 +1,23 @@
|
|
1
1
|
module Rocktumbler
|
2
|
+
# The Group is a class responsible for outputting a gem group
|
2
3
|
class Group
|
3
|
-
|
4
4
|
attr_accessor :name
|
5
5
|
|
6
|
-
def initialize(name,gem_dependencies)
|
6
|
+
def initialize(name, gem_dependencies, opts)
|
7
7
|
@name = name
|
8
|
-
@
|
8
|
+
@opts = opts
|
9
|
+
@gems = gem_dependencies.map { |g| Rocktumbler::Gem.new(g, @opts) }
|
9
10
|
end
|
10
11
|
|
11
12
|
def print
|
12
|
-
str =
|
13
|
+
str = "\n"
|
13
14
|
prepend_spacing = (@name == :default) ? '' : ' '
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
if @name != :default
|
16
|
+
str += "\ngroup #{@name.to_s.gsub(/[\[\]]/, '')} do\n"
|
17
|
+
end
|
18
|
+
str += @gems.map { |g| g.print(prepend_spacing) }.join("\n")
|
19
|
+
str += "\nend\n" if @name != :default
|
20
|
+
str
|
18
21
|
end
|
19
22
|
end
|
20
23
|
end
|
@@ -1,7 +1,10 @@
|
|
1
1
|
module Rocktumbler
|
2
|
+
# The GroupFilter is a class responsible for filtering gems into group
|
3
|
+
# and sorting the groups and their gems alphabetically.
|
2
4
|
class GroupFilter
|
3
|
-
def initialize(gem_dependencies)
|
5
|
+
def initialize(gem_dependencies, opts)
|
4
6
|
@gem_dependencies = gem_dependencies
|
7
|
+
@opts = opts
|
5
8
|
end
|
6
9
|
|
7
10
|
def filter
|
@@ -9,16 +12,22 @@ module Rocktumbler
|
|
9
12
|
|
10
13
|
default_gems = gems_by_group.delete([:default])
|
11
14
|
default_gems.sort!
|
12
|
-
groups = [Rocktumbler::Group.new(:default,default_gems)]
|
15
|
+
groups = [Rocktumbler::Group.new(:default, default_gems, @opts)]
|
13
16
|
|
14
|
-
|
17
|
+
gems_by_group_sorted = sort_groups(gems_by_group, default_gems)
|
18
|
+
|
19
|
+
groups.concat(gems_by_group_sorted)
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def sort_groups(gems_by_group, default_gems)
|
25
|
+
gems_by_group.inject([]) do |arr, (group, gems)|
|
15
26
|
gems_unique_to_group = gems - default_gems
|
16
27
|
gems_unique_to_group.sort!
|
17
28
|
gems_unique_to_group.uniq!
|
18
|
-
|
29
|
+
arr << Rocktumbler::Group.new(group, gems_unique_to_group, @opts)
|
19
30
|
end
|
20
|
-
|
21
|
-
return groups
|
22
31
|
end
|
23
32
|
end
|
24
33
|
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
require 'optparse'
|
2
|
+
require 'pp'
|
3
|
+
|
4
|
+
module Rocktumbler
|
5
|
+
class Option
|
6
|
+
#
|
7
|
+
# Return a structure describing the options.
|
8
|
+
#
|
9
|
+
def self.parse(args)
|
10
|
+
# The options specified on the command line will be collected in *options*.
|
11
|
+
# We set default values here.
|
12
|
+
options = OpenStruct.new
|
13
|
+
options.gem_info = false
|
14
|
+
options.gem_homepage = false
|
15
|
+
options.skip_write = false
|
16
|
+
|
17
|
+
opt_parser = OptionParser.new do |opts|
|
18
|
+
opts.banner = "Usage: tumble [options]"
|
19
|
+
|
20
|
+
opts.separator ""
|
21
|
+
opts.separator "Specific options:"
|
22
|
+
|
23
|
+
opts.on("-i", "--info", "Display gem info comment.") do |docs|
|
24
|
+
options.gem_info = true
|
25
|
+
end
|
26
|
+
|
27
|
+
opts.on("-d", "--homepage", "Display gem homepage comment.") do |docs|
|
28
|
+
options.gem_homepage = true
|
29
|
+
end
|
30
|
+
|
31
|
+
opts.on("-s", "--skip-write", "Skip writing of Gemfile") do |docs|
|
32
|
+
options.skip_write = true
|
33
|
+
end
|
34
|
+
|
35
|
+
opts.separator ""
|
36
|
+
opts.separator "Common options:"
|
37
|
+
|
38
|
+
# No argument, shows at tail. This will print an options summary.
|
39
|
+
opts.on_tail("-h", "--help", "Show this message") do
|
40
|
+
puts opts
|
41
|
+
exit
|
42
|
+
end
|
43
|
+
|
44
|
+
opts.on_tail("--version", "Show version") do
|
45
|
+
puts Rocktumbler::VERSION
|
46
|
+
exit
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
opt_parser.parse!(args)
|
51
|
+
options
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
data/lib/rocktumbler/tumbler.rb
CHANGED
@@ -1,44 +1,54 @@
|
|
1
1
|
require_relative 'exceptions'
|
2
2
|
|
3
3
|
module Rocktumbler
|
4
|
+
# The Tumbler class is responsible for executing the top level tumble method
|
5
|
+
# and reads, parses, cleans, writes and verifies the new gemfile.
|
4
6
|
class Tumbler
|
5
|
-
def initialize(location=Bundler.default_gemfile)
|
7
|
+
def initialize(location = Bundler.default_gemfile)
|
8
|
+
@opts = {}
|
6
9
|
@gemfile_location = location
|
7
10
|
@bundler_dependencies = parse_gemfile(@gemfile_location)
|
8
11
|
@gemfile = Rocktumbler::Gemfile.new(location)
|
9
12
|
end
|
10
13
|
|
11
|
-
def tumble(
|
12
|
-
|
14
|
+
def tumble(args = ARGV)
|
15
|
+
@opts = Option.parse(args)
|
16
|
+
groups = Rocktumbler::GroupFilter.new(@bundler_dependencies, @opts).filter
|
13
17
|
clean_gemfile_str = @gemfile.print_source_and_ruby
|
14
18
|
clean_gemfile_str << groups.map(&:print).join
|
15
19
|
compare_to_original_gemfile(clean_gemfile_str)
|
16
|
-
write(clean_gemfile_str) unless opts
|
17
|
-
|
20
|
+
write(clean_gemfile_str) unless @opts.skip_write
|
21
|
+
clean_gemfile_str
|
18
22
|
end
|
19
23
|
|
20
24
|
def compare_to_original_gemfile(clean_gemfile_str)
|
21
|
-
temp_gemfile =
|
22
|
-
temp_gemfile.write(clean_gemfile_str)
|
23
|
-
temp_gemfile.close
|
25
|
+
temp_gemfile = write_temp_gemfile(clean_gemfile_str)
|
24
26
|
temp_bundler_dependencies = parse_gemfile(temp_gemfile.path)
|
25
27
|
diff = @bundler_dependencies - temp_bundler_dependencies
|
26
28
|
|
27
29
|
if diff.empty?
|
28
30
|
return true
|
29
31
|
else
|
30
|
-
|
32
|
+
fail IncomparableGemfileError, "Clean Gemfile is not comparable to the\
|
33
|
+
existing Gemfile. The following gems are missing : #{diff.map(&:name)}."
|
31
34
|
end
|
32
35
|
end
|
33
36
|
|
34
37
|
def write(clean_gemfile_str)
|
35
|
-
gemfile = File.open(@gemfile_location,'w')
|
38
|
+
gemfile = File.open(@gemfile_location, 'w')
|
36
39
|
gemfile.write(clean_gemfile_str)
|
37
40
|
gemfile.close
|
38
41
|
end
|
39
42
|
|
40
43
|
private
|
41
44
|
|
45
|
+
def write_temp_gemfile(clean_gemfile_str)
|
46
|
+
temp_gemfile = Tempfile.new('Gemfile.temp')
|
47
|
+
temp_gemfile.write(clean_gemfile_str)
|
48
|
+
temp_gemfile.close
|
49
|
+
temp_gemfile
|
50
|
+
end
|
51
|
+
|
42
52
|
def parse_gemfile(location)
|
43
53
|
builder = Bundler::Dsl.new
|
44
54
|
builder.eval_gemfile(location)
|
data/lib/rocktumbler/version.rb
CHANGED
data/lib/rocktumbler.rb
CHANGED
@@ -3,11 +3,13 @@ require 'ostruct'
|
|
3
3
|
require 'tempfile'
|
4
4
|
require 'bundler'
|
5
5
|
|
6
|
+
# Rocktumbler module
|
6
7
|
module Rocktumbler
|
7
8
|
autoload :Tumbler, 'rocktumbler/tumbler'
|
8
9
|
autoload :Group, 'rocktumbler/group'
|
9
10
|
autoload :GroupFilter, 'rocktumbler/group_filter'
|
10
11
|
autoload :Gem, 'rocktumbler/gem'
|
11
12
|
autoload :Gemfile, 'rocktumbler/gemfile'
|
12
|
-
autoload :
|
13
|
+
autoload :VERSION, 'rocktumbler/version'
|
14
|
+
autoload :Option, 'rocktumbler/option'
|
13
15
|
end
|
data/rocktumbler.gemspec
CHANGED
@@ -4,21 +4,24 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
require 'rocktumbler/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
7
|
+
spec.name = 'rocktumbler'
|
8
8
|
spec.version = Rocktumbler::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
9
|
+
spec.authors = ['Simon Reed']
|
10
|
+
spec.email = ['simonpreed@gmail.com']
|
11
11
|
|
12
|
-
spec.summary =
|
13
|
-
spec.description =
|
14
|
-
spec.homepage =
|
15
|
-
spec.license =
|
12
|
+
spec.summary = 'Polish your Gemfile to make sure it remains consistent.'
|
13
|
+
spec.description = 'Polish your Gemfile to make sure it remains consistent.'
|
14
|
+
spec.homepage = 'https://github.com/simonreed/rocktumbler'
|
15
|
+
spec.license = 'MIT'
|
16
16
|
|
17
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f|
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f|
|
18
|
+
f.match(%r{^(test|spec|features)/})
|
19
|
+
}
|
18
20
|
spec.executables = %w(tumble)
|
19
|
-
spec.require_paths = [
|
21
|
+
spec.require_paths = ['lib']
|
20
22
|
|
21
|
-
spec.add_development_dependency
|
23
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
24
|
+
spec.add_development_dependency('rspec', '~> 3.2.0')
|
22
25
|
|
23
|
-
spec.add_runtime_dependency
|
26
|
+
spec.add_runtime_dependency 'bundler', '~> 1.7'
|
24
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rocktumbler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Reed
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -24,20 +24,34 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '10.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 3.2.0
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 3.2.0
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
45
|
- - "~>"
|
32
46
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1.
|
47
|
+
version: '1.7'
|
34
48
|
type: :runtime
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
52
|
- - "~>"
|
39
53
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1.
|
54
|
+
version: '1.7'
|
41
55
|
description: Polish your Gemfile to make sure it remains consistent.
|
42
56
|
email:
|
43
57
|
- simonpreed@gmail.com
|
@@ -61,10 +75,9 @@ files:
|
|
61
75
|
- lib/rocktumbler/gemfile.rb
|
62
76
|
- lib/rocktumbler/group.rb
|
63
77
|
- lib/rocktumbler/group_filter.rb
|
78
|
+
- lib/rocktumbler/option.rb
|
64
79
|
- lib/rocktumbler/tumbler.rb
|
65
80
|
- lib/rocktumbler/version.rb
|
66
|
-
- rocktumbler-0.1.0.gem
|
67
|
-
- rocktumbler-0.1.1.gem
|
68
81
|
- rocktumbler.gemspec
|
69
82
|
homepage: https://github.com/simonreed/rocktumbler
|
70
83
|
licenses:
|
@@ -86,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
99
|
version: '0'
|
87
100
|
requirements: []
|
88
101
|
rubyforge_project:
|
89
|
-
rubygems_version: 2.4.
|
102
|
+
rubygems_version: 2.4.5
|
90
103
|
signing_key:
|
91
104
|
specification_version: 4
|
92
105
|
summary: Polish your Gemfile to make sure it remains consistent.
|
data/rocktumbler-0.1.0.gem
DELETED
Binary file
|
data/rocktumbler-0.1.1.gem
DELETED
Binary file
|