postit 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +3 -0
- data/.rubocop_cocoapods.yml +24 -2
- data/.travis.yml +10 -1
- data/CHANGELOG.md +29 -0
- data/README.md +41 -0
- data/Rakefile +17 -7
- data/bin/rake +12 -0
- data/bin/rspec +12 -0
- data/bin/rubocop +11 -0
- data/lib/postit/environment.rb +1 -1
- data/lib/postit/parser.rb +3 -2
- data/lib/postit/version.rb +1 -1
- data/postit.gemspec +4 -3
- metadata +24 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 592a1ecdc94072403c01456d98a308564ae40249
|
4
|
+
data.tar.gz: 32ca570e4c8816ee5a9c217c7784a63c2e8df49e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6e538e9198db6c4dfa0d93b3feba47bb801e85f575e6bd4d512a566a5138cd6567523a77ee55dd8a415defa282543a413a06a99bcb254b79ede68910eb9c404
|
7
|
+
data.tar.gz: 68ad6b468c36692cb9f29d1b4e7a2e3b3a4ae90f38151c63263bb1524d353aa30e8bb0fcbd19a1e99e5ba4bc9a978acf01d3ac7ffd6bc148e73138544f4a6412
|
data/.rspec
ADDED
data/.rubocop_cocoapods.yml
CHANGED
@@ -5,6 +5,7 @@ AllCops:
|
|
5
5
|
- ./*.gemspec
|
6
6
|
Exclude:
|
7
7
|
- ./spec/fixtures/**/*
|
8
|
+
- ./vendor/bundle/**/*
|
8
9
|
|
9
10
|
# At the moment not ready to be used
|
10
11
|
# https://github.com/bbatsov/rubocop/issues/947
|
@@ -39,7 +40,10 @@ Encoding:
|
|
39
40
|
|
40
41
|
# Having these make it easier to *not* forget to add one when adding a new
|
41
42
|
# value and you can simply copy the previous line.
|
42
|
-
|
43
|
+
Style/TrailingCommaInArguments:
|
44
|
+
EnforcedStyleForMultiline: comma
|
45
|
+
|
46
|
+
Style/TrailingCommaInLiteral:
|
43
47
|
EnforcedStyleForMultiline: comma
|
44
48
|
|
45
49
|
Style/MultilineOperationIndentation:
|
@@ -53,11 +57,21 @@ GuardClause:
|
|
53
57
|
Next:
|
54
58
|
Enabled: false
|
55
59
|
|
60
|
+
# Autocorrect makes this cop much more useful, taking away needless guessing
|
61
|
+
Lint/EndAlignment:
|
62
|
+
AutoCorrect: true
|
63
|
+
|
64
|
+
|
56
65
|
# Arbitrary max lengths for classes simply do not work and enabling this will
|
57
66
|
# lead to a never ending stream of annoyance and changes.
|
58
67
|
Metrics/ClassLength:
|
59
68
|
Enabled: false
|
60
69
|
|
70
|
+
# Arbitrary max lengths for modules simply do not work and enabling this will
|
71
|
+
# lead to a never ending stream of annoyance and changes.
|
72
|
+
Metrics/ModuleLength:
|
73
|
+
Enabled: false
|
74
|
+
|
61
75
|
# Arbitrary max lengths for methods simply do not work and enabling this will
|
62
76
|
# lead to a never ending stream of annoyance and changes.
|
63
77
|
Metrics/MethodLength:
|
@@ -77,6 +91,11 @@ Metrics/AbcSize:
|
|
77
91
|
Metrics/CyclomaticComplexity:
|
78
92
|
Enabled: false
|
79
93
|
|
94
|
+
# It will be obvious which code is complex, Rubocop should only lint simple
|
95
|
+
# rules for us.
|
96
|
+
Metrics/PerceivedComplexity:
|
97
|
+
Enabled: false
|
98
|
+
|
80
99
|
#- CocoaPods support for Ruby 1.8.7 ------------------------------------------#
|
81
100
|
|
82
101
|
HashSyntax:
|
@@ -101,6 +120,10 @@ AmbiguousRegexpLiteral:
|
|
101
120
|
Exclude:
|
102
121
|
- spec/**/*
|
103
122
|
|
123
|
+
Performance/RedundantMatch:
|
124
|
+
Exclude:
|
125
|
+
- spec/**/*
|
126
|
+
|
104
127
|
# Allow `object.should == object` syntax.
|
105
128
|
Void:
|
106
129
|
Exclude:
|
@@ -113,4 +136,3 @@ ClassAndModuleChildren:
|
|
113
136
|
UselessComparison:
|
114
137
|
Exclude:
|
115
138
|
- spec/**/*
|
116
|
-
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
## 0.1.2 (2016-04-25)
|
2
|
+
|
3
|
+
##### Enhancements
|
4
|
+
|
5
|
+
* Add a README with documentation.
|
6
|
+
[Samuel Giddins](https://github.com/segiddins)
|
7
|
+
[#2](https://github.com/bundler/postit/issues/2)
|
8
|
+
|
9
|
+
##### Enhancements
|
10
|
+
|
11
|
+
* Invoke a pre-release bundler version if no particular requirement is needed,
|
12
|
+
in keeping with recent RubyGems versions.
|
13
|
+
[Samuel Giddins](https://github.com/segiddins)
|
14
|
+
|
15
|
+
|
16
|
+
## 0.1.1 (2015-06-17)
|
17
|
+
|
18
|
+
##### Enhancements
|
19
|
+
|
20
|
+
* Add `--bundler-version` flag to obtain only the determined bundler version.
|
21
|
+
[Samuel Giddins](https://github.com/segiddins)
|
22
|
+
|
23
|
+
|
24
|
+
## 0.1.0 (2015-06-06)
|
25
|
+
|
26
|
+
##### Enhancements
|
27
|
+
|
28
|
+
* Initial implementation.
|
29
|
+
[Samuel Giddins](https://github.com/segiddins)
|
data/README.md
CHANGED
@@ -1,2 +1,43 @@
|
|
1
1
|
# PostIt
|
2
2
|
## The Bundler Version Manager
|
3
|
+
|
4
|
+
```bash
|
5
|
+
$ gem install postit
|
6
|
+
```
|
7
|
+
|
8
|
+
Bundler is great at managing your gem dependencies, but if you've ever thought
|
9
|
+
"What I really need is a way to manage my _bundler_ version" -- look no further!
|
10
|
+
|
11
|
+
PostIt has a few different modes of operation, all of which attempt to make
|
12
|
+
keeping your team on a consistent bundler version a breeze.
|
13
|
+
|
14
|
+
### Usage
|
15
|
+
|
16
|
+
The main way of using PostIt is via the `postit` command -- you can use it just
|
17
|
+
like the `bundle` command, and PostIt will handle invoking the correct bundler
|
18
|
+
executable and forwarding along all of your arguments. So to `bundle install`,
|
19
|
+
you'd just run `postit install`, etc.
|
20
|
+
|
21
|
+
Additionally, if you have `require 'bundler/setup'` anywhere in your code, you
|
22
|
+
can replace it with `require 'postit/setup'` and it will activate the correct Bundler version and then `require 'bundler/setup'`.
|
23
|
+
|
24
|
+
If you're building tooling and want to know what version of Bundler PostIt has
|
25
|
+
inferred, you can run `postit --bundler-version` to have that version printed to
|
26
|
+
`STDOUT`.
|
27
|
+
|
28
|
+
### Bundler Version Selection
|
29
|
+
|
30
|
+
#### `Gemfile.lock`
|
31
|
+
|
32
|
+
By default, PostIt will read your Bundler version from your `Gemfile.lock`,
|
33
|
+
meaning you don't have to do anything special to use the same bundler version as
|
34
|
+
the rest of your team -- just `postit install` and PostIt will automatically
|
35
|
+
infer the correct Bundler version for you.
|
36
|
+
|
37
|
+
#### Command Line Argument
|
38
|
+
|
39
|
+
When invoking `postit`, you can specify the Bundler version as the first argument, so to run `bundle exec` with Bundler 1.9.6, for example, you can do `postit 1.9.6 exec`.
|
40
|
+
|
41
|
+
#### Environment Variable
|
42
|
+
|
43
|
+
Setting the `BUNDLER_VERSION` environment variable to the desired Bundler version will work as if you'd passed the version as a command line argument.
|
data/Rakefile
CHANGED
@@ -4,38 +4,48 @@ GEMSPEC = Gem::Specification.load('postit.gemspec')
|
|
4
4
|
desc "Installs all development dependencies"
|
5
5
|
task :bootstrap do
|
6
6
|
GEMSPEC.development_dependencies.each do |dep|
|
7
|
+
next if dep.name == 'rubocop' && RUBY_VERSION < '1.9.3'
|
7
8
|
sh 'gem', 'install', dep.name, '-v', dep.requirement.to_s
|
8
9
|
end
|
9
10
|
end
|
10
11
|
|
11
12
|
begin
|
12
13
|
GEMSPEC.development_dependencies.each do |dep|
|
14
|
+
next if dep.name == 'rubocop' && RUBY_VERSION < '1.9.3'
|
13
15
|
gem dep.name, dep.requirement.to_s
|
14
16
|
end
|
17
|
+
Gem.finish_resolve if Gem.respond_to?(:finish_resolve)
|
15
18
|
|
16
19
|
require 'bundler/gem_tasks'
|
17
20
|
require 'tmpdir'
|
18
21
|
|
19
|
-
desc 'Run the specs'
|
20
|
-
task :
|
21
|
-
|
22
|
+
desc 'Run the integration specs'
|
23
|
+
task :integration_spec do
|
24
|
+
print 'Running integration specs'
|
22
25
|
files = FileList['spec/**/*_spec.sh'].shuffle.map { |s| File.expand_path(s) }
|
23
26
|
files.each do |spec|
|
24
27
|
Dir.mktmpdir do |dir|
|
25
28
|
Dir.chdir(dir) do
|
26
29
|
rubyopt = "RUBYOPT='-I#{File.expand_path('../lib', __FILE__)}'"
|
27
30
|
path = %(PATH="#{File.expand_path('../exe', __FILE__)}:$PATH")
|
28
|
-
sh "#{rubyopt} #{path} sh '#{spec}'", verbose
|
31
|
+
sh "#{rubyopt} #{path} sh '#{spec}'", :verbose => false
|
29
32
|
end
|
30
33
|
end
|
31
34
|
end
|
32
35
|
puts "\n\n"
|
33
36
|
end
|
34
37
|
|
35
|
-
require '
|
36
|
-
|
38
|
+
require 'rspec/core/rake_task'
|
39
|
+
RSpec::Core::RakeTask.new
|
37
40
|
|
38
|
-
|
41
|
+
begin
|
42
|
+
require 'rubocop/rake_task'
|
43
|
+
RuboCop::RakeTask.new
|
44
|
+
rescue LoadError
|
45
|
+
task :rubocop
|
46
|
+
end
|
47
|
+
|
48
|
+
task :default => [:spec, :integration_spec, :rubocop]
|
39
49
|
|
40
50
|
rescue LoadError, NameError
|
41
51
|
warn "Please run rake bootstrap"
|
data/bin/rake
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
gemspec = Gem::Specification.load(
|
5
|
+
File.expand_path('../../postit.gemspec', __FILE__))
|
6
|
+
gemspec.development_dependencies.each do |dep|
|
7
|
+
next if dep.name == 'rubocop' && RUBY_VERSION < '1.9.3'
|
8
|
+
gem dep.name, dep.requirement.to_s
|
9
|
+
end
|
10
|
+
Gem.finish_resolve if Gem.respond_to?(:finish_resolve)
|
11
|
+
|
12
|
+
load Gem.bin_path('rake', 'rake')
|
data/bin/rspec
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
gemspec = Gem::Specification.load(
|
5
|
+
File.expand_path('../../postit.gemspec', __FILE__))
|
6
|
+
gemspec.development_dependencies.each do |dep|
|
7
|
+
next if dep.name == 'rubocop' && RUBY_VERSION < '1.9.3'
|
8
|
+
gem dep.name, dep.requirement.to_s
|
9
|
+
end
|
10
|
+
Gem.finish_resolve if Gem.respond_to?(:finish_resolve)
|
11
|
+
|
12
|
+
load Gem.bin_path('rspec-core', 'rspec')
|
data/bin/rubocop
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
gemspec = Gem::Specification.load(
|
5
|
+
File.expand_path('../../postit.gemspec', __FILE__))
|
6
|
+
gemspec.development_dependencies.each do |dep|
|
7
|
+
gem dep.name, dep.requirement.to_s
|
8
|
+
end
|
9
|
+
Gem.finish_resolve if Gem.respond_to?(:finish_resolve)
|
10
|
+
|
11
|
+
load Gem.bin_path('rubocop', 'rubocop')
|
data/lib/postit/environment.rb
CHANGED
data/lib/postit/parser.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
|
1
3
|
module PostIt
|
2
4
|
class Parser
|
3
5
|
def initialize(file)
|
@@ -8,8 +10,7 @@ module PostIt
|
|
8
10
|
/\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
|
9
11
|
|
10
12
|
def parse
|
11
|
-
lockfile = File.
|
12
|
-
return unless lockfile
|
13
|
+
return unless lockfile = File.file?(@file) && File.read(@file)
|
13
14
|
if lockfile =~ BUNDLED_WITH
|
14
15
|
Regexp.last_match(1)
|
15
16
|
else
|
data/lib/postit/version.rb
CHANGED
data/postit.gemspec
CHANGED
@@ -12,13 +12,14 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.summary = 'The Bundler version manager'
|
13
13
|
spec.homepage = 'https://github.com/segiddins/postit'
|
14
14
|
|
15
|
-
spec.files = `git ls-files -z`.split("\x0")
|
16
|
-
|
15
|
+
spec.files = `git ls-files -z`.split("\x0").
|
16
|
+
reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
17
|
spec.bindir = 'exe'
|
18
18
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
21
|
spec.add_development_dependency 'bundler', '~> 1.10'
|
22
22
|
spec.add_development_dependency 'rake', '~> 10.0'
|
23
|
-
spec.add_development_dependency 'rubocop', '0.
|
23
|
+
spec.add_development_dependency 'rubocop', '0.39'
|
24
|
+
spec.add_development_dependency 'rspec', '~> 3.4.0'
|
24
25
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: postit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Giddins
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -44,14 +44,28 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0.
|
47
|
+
version: '0.39'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0.
|
54
|
+
version: '0.39'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 3.4.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 3.4.0
|
55
69
|
description:
|
56
70
|
email:
|
57
71
|
- segiddins@segiddins.me
|
@@ -61,12 +75,17 @@ extensions: []
|
|
61
75
|
extra_rdoc_files: []
|
62
76
|
files:
|
63
77
|
- ".gitignore"
|
78
|
+
- ".rspec"
|
64
79
|
- ".rubocop.yml"
|
65
80
|
- ".rubocop_cocoapods.yml"
|
66
81
|
- ".travis.yml"
|
82
|
+
- CHANGELOG.md
|
67
83
|
- README.md
|
68
84
|
- Rakefile
|
69
85
|
- bin/console
|
86
|
+
- bin/rake
|
87
|
+
- bin/rspec
|
88
|
+
- bin/rubocop
|
70
89
|
- bin/setup
|
71
90
|
- exe/postit
|
72
91
|
- lib/postit.rb
|
@@ -94,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
113
|
version: '0'
|
95
114
|
requirements: []
|
96
115
|
rubyforge_project:
|
97
|
-
rubygems_version: 2.
|
116
|
+
rubygems_version: 2.6.3
|
98
117
|
signing_key:
|
99
118
|
specification_version: 4
|
100
119
|
summary: The Bundler version manager
|