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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NTlhOWJkNDdjN2U5NDI2M2FhMDhiOTZiM2VjYjM1ZTY0YjcyODUzZg==
4
+ YjZhYTM1YjllMzljZjhiZWEwNTE3ZDEwZDM2NThjZjk5ZjI5NjkwZg==
5
5
  data.tar.gz: !binary |-
6
- NzBiZDYxZWRhZTkzODk4ZDQ0ZjA2YzE5MzQ5NzI1N2JkYzNjMzg1OQ==
6
+ ZTAzZWZlNDczM2VmMGVkMTE4ZDI2ZGU5ZDY4ZWE0NzE1M2Q4NjQ0Yg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NjE1ZWJlYzhlOWQ3NmI2MGFmMDBiZTdkNjllMDRjYmU3ZDUxNDk3M2ViZWEz
10
- MzhjNGIzNGJiNmM4NTdlNjk0YmZjNmU2OGNjYzAzNjc2OGFiMWNiMmMyNTk2
11
- YjE5OGIwMTdkOGE1MGZiMDU2M2ZlYzllNzUzMzlmMjU4NWQzMmY=
9
+ YmFjYTIxZTZjNDA0Y2MyMzdiN2I1YzJlMTZjMjlmOWM1MjcwZjVjMTBlNDgz
10
+ Mzc2MWQ4MTIzYTA1NGFmZjg2ODY3YjllM2ZkNjk4MmJkNzk4YjdhY2QxNGE4
11
+ ZTJhNjU4NWYzMzIxMzM4ZDg3NzhkOTQ1OGZkYTVlNzRkYTZlNzc=
12
12
  data.tar.gz: !binary |-
13
- Y2EwNGMxZTcyYWFkZmYzMzY3NjdiYWIzOWUyZWMwNTJkNTU2MDZmMTY3YTdm
14
- MzNjMDdhZWZiMTkxMjIxODg0Mzg1MjJhYzk4ODFjYzFjMTNlOTE5ZDQyODk1
15
- N2QwZDkxMGUwOTEyYzI2OWIxOTQ1MjFhYjZkY2YwZWU1ZDM1YTA=
13
+ NWFkMjgzNTkwNWZhZGJjYTdmOTJhNDhiYTNhODM4YzI3Mjk2ZjU3ZDQ0OGQ5
14
+ OGI0NjdhYTQ2ZDUyNzUxY2JiMzFkNWM2MGFlMzg4MzYzNDA5MGY2ZjI5MDg1
15
+ NWEwOWFhMDIwYzk1NTBiNjI1OTU1MTNlMmYxNGU5MzIzOTY1NWY=
data/.travis.yml CHANGED
@@ -14,3 +14,6 @@ deploy:
14
14
  on:
15
15
  tags: true
16
16
  repo: theodi/henry
17
+ after_success:
18
+ - gem install henry
19
+ - bundle exec henry deploy
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 travis` and `travis setup rubygems` and follow the onscreen prompts.
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
@@ -1,9 +1,11 @@
1
1
  require 'github_api'
2
2
  require 'github_changelog_generator'
3
3
  require 'thor'
4
+ require 'yaml'
4
5
 
5
6
  require "henry/version"
6
7
  require "henry/deploy"
8
+ require "henry/bootstrap"
7
9
  require "henry/cli"
8
10
 
9
11
  module Henry
@@ -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
@@ -4,5 +4,10 @@ module Henry
4
4
  def deploy
5
5
  Henry::Deploy.new(Dir.pwd).perform
6
6
  end
7
+
8
+ desc "bootstrap", "set up your .travis.yml for deployment with Henry"
9
+ def bootstrap
10
+ Bootstrap.new(self).perform
11
+ end
7
12
  end
8
13
  end
data/lib/henry/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Henry
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
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.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-09 00:00:00.000000000 Z
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