henry 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 +8 -8
- data/.travis.yml +3 -0
- data/CHANGELOG.md +7 -0
- data/README.md +1 -9
- data/henry.gemspec +1 -0
- data/lib/henry.rb +2 -0
- data/lib/henry/bootstrap.rb +51 -0
- data/lib/henry/cli.rb +5 -0
- data/lib/henry/version.rb +1 -1
- metadata +18 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YjZhYTM1YjllMzljZjhiZWEwNTE3ZDEwZDM2NThjZjk5ZjI5NjkwZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZTAzZWZlNDczM2VmMGVkMTE4ZDI2ZGU5ZDY4ZWE0NzE1M2Q4NjQ0Yg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YmFjYTIxZTZjNDA0Y2MyMzdiN2I1YzJlMTZjMjlmOWM1MjcwZjVjMTBlNDgz
|
10
|
+
Mzc2MWQ4MTIzYTA1NGFmZjg2ODY3YjllM2ZkNjk4MmJkNzk4YjdhY2QxNGE4
|
11
|
+
ZTJhNjU4NWYzMzIxMzM4ZDg3NzhkOTQ1OGZkYTVlNzRkYTZlNzc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NWFkMjgzNTkwNWZhZGJjYTdmOTJhNDhiYTNhODM4YzI3Mjk2ZjU3ZDQ0OGQ5
|
14
|
+
OGI0NjdhYTQ2ZDUyNzUxY2JiMzFkNWM2MGFlMzg4MzYzNDA5MGY2ZjI5MDg1
|
15
|
+
NWEwOWFhMDIwYzk1NTBiNjI1OTU1MTNlMmYxNGU5MzIzOTY1NWY=
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
## [0.1.1](https://github.com/theodi/henry/tree/0.1.1) (2016-03-09)
|
4
|
+
## [0.1.1-beta](https://github.com/theodi/henry/tree/0.1.1-beta) (2016-03-09)
|
5
|
+
|
6
|
+
|
7
|
+
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|
data/README.md
CHANGED
@@ -17,15 +17,7 @@ with Rubygems integration, it will then build the latest tag, and publish it dir
|
|
17
17
|
|
18
18
|
## Usage
|
19
19
|
|
20
|
-
In your project directory, first run `gem install
|
21
|
-
|
22
|
-
Then add the following to your `.travis.yml`
|
23
|
-
|
24
|
-
```
|
25
|
-
after_success:
|
26
|
-
- gem install henry
|
27
|
-
- henry deploy
|
28
|
-
```
|
20
|
+
In your project directory, first run `gem install henry` and `henry bootstrap` and follow the onscreen prompts.
|
29
21
|
|
30
22
|
Then push up your changes, and sit back and relax, safe in the knowledge that you'll never forget to push a
|
31
23
|
new gem version again.
|
data/henry.gemspec
CHANGED
@@ -22,6 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_dependency "github_api", "~> 0.13"
|
23
23
|
spec.add_dependency "github_changelog_generator", "1.9.0"
|
24
24
|
spec.add_dependency "thor", "~> 0.19.1"
|
25
|
+
spec.add_dependency "travis", "~> 1.8.2"
|
25
26
|
|
26
27
|
spec.add_development_dependency "bundler", "~> 1.11"
|
27
28
|
spec.add_development_dependency "rake", "~> 10.0"
|
data/lib/henry.rb
CHANGED
@@ -0,0 +1,51 @@
|
|
1
|
+
module Henry
|
2
|
+
class Bootstrap
|
3
|
+
|
4
|
+
def initialize(shell = Thor.new)
|
5
|
+
@shell = shell
|
6
|
+
end
|
7
|
+
|
8
|
+
def perform
|
9
|
+
create_project
|
10
|
+
setup_deployment
|
11
|
+
encrypt_api_key
|
12
|
+
add_henry
|
13
|
+
end
|
14
|
+
|
15
|
+
def create_project
|
16
|
+
return if File.exist?('.travis.yml')
|
17
|
+
@shell.say("Your project doesn't seem to have a `.travis.yml` - creating one now", :green)
|
18
|
+
version = @shell.ask('What version of Ruby do you want to test against? |2.1.4|')
|
19
|
+
system "travis init ruby --rvm #{version.empty? ? '2.1.4' : version}"
|
20
|
+
end
|
21
|
+
|
22
|
+
def setup_deployment
|
23
|
+
if travis['deploy'].nil?
|
24
|
+
@shell.say('Setting up deployment with Rubygems', :green)
|
25
|
+
system "travis setup rubygems"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def encrypt_api_key
|
30
|
+
github_api_key = @shell.ask("Please enter your Github oauth token - visit https://github.com/settings/tokens/new?description=Henry%20Token to set one up if you haven't already")
|
31
|
+
@shell.say('Encrypting your token and adding it to your .travis.yml', :green)
|
32
|
+
`travis encrypt GITHUB_OUATH_TOKEN=#{github_api_key} --add`
|
33
|
+
end
|
34
|
+
|
35
|
+
def add_henry
|
36
|
+
@shell.say('Adding Henry to your .travis.yml', :green)
|
37
|
+
t = travis
|
38
|
+
t['after_success'] ||= []
|
39
|
+
t['after_success'] << 'gem install henry'
|
40
|
+
t['after_success'] << 'henry deploy'
|
41
|
+
File.open('.travis.yml', 'w+') do |f|
|
42
|
+
f.write(t.to_yaml)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def travis
|
47
|
+
YAML.load_file('.travis.yml')
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
end
|
data/lib/henry/cli.rb
CHANGED
data/lib/henry/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: henry
|
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
|
- pezholio
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: git
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 0.19.1
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: travis
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 1.8.2
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ~>
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 1.8.2
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: bundler
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -189,6 +203,7 @@ files:
|
|
189
203
|
- .gitignore
|
190
204
|
- .rspec
|
191
205
|
- .travis.yml
|
206
|
+
- CHANGELOG.md
|
192
207
|
- CODE_OF_CONDUCT.md
|
193
208
|
- Gemfile
|
194
209
|
- LICENSE.txt
|
@@ -199,6 +214,7 @@ files:
|
|
199
214
|
- exe/henry
|
200
215
|
- henry.gemspec
|
201
216
|
- lib/henry.rb
|
217
|
+
- lib/henry/bootstrap.rb
|
202
218
|
- lib/henry/cli.rb
|
203
219
|
- lib/henry/deploy.rb
|
204
220
|
- lib/henry/version.rb
|