mina-ci 0.0.3 → 0.0.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e7f5651bf2eeaeaf0e3c3d7ed694f0a09651a29
4
- data.tar.gz: 3fb7760ee93b694b0b768921860062821193dd55
3
+ metadata.gz: 152792a7227b7ca55889fc2ec43c34d056909e76
4
+ data.tar.gz: 2895e15bd7c1848e64f0d00d84891f2c463f1366
5
5
  SHA512:
6
- metadata.gz: eb625fc2ba07cf9e7bf07f9630af6baf8d542aff437fe6fbd193d7184704f49d35c2e6d84270808faa2b3ef676ab14ee594c9c43cedc8a277231af1ccdbd0c36
7
- data.tar.gz: 6d42c40b2e655009d4ba1b30ad417ed1df20da921c16f46befe02298623c0c0690ffbbe8e24ae9b6c44fee066efb91ffa08555d46418dc8137346525dc58abf1
6
+ metadata.gz: bfe99c21f5380d49944887529ffefa1728d88dcfb5089418bb254a9090a1ecb09148be9555ff516c715ea0fefdc4652bd954261c0db6111f062bcac89fd8dd23
7
+ data.tar.gz: 1fbcfde0efdd96765b650564451c046db2095a6f5fb682908eea58a01d2771249383cf44a19669da357b01240344c995ad1114d5280bc8949adc83579212c0c1
data/README.md CHANGED
@@ -1,2 +1,50 @@
1
1
  # mina-ci
2
2
  Mina recipe for checking Circle CI build status
3
+
4
+ ## Installation
5
+
6
+ Add this line to your application's Gemfile:
7
+
8
+ ```ruby
9
+ gem 'mina-ci', require: false
10
+ ```
11
+
12
+ And then execute:
13
+
14
+ $ bundle
15
+
16
+ ## Usage
17
+
18
+ require 'mina/ci'
19
+
20
+ ...
21
+ set :circle_token, 'your circle API token'
22
+ set :circle_username, 'your circle project username'
23
+ set :circle_project, 'your circle project'
24
+
25
+ task deploy: :environment do
26
+ deploy do
27
+ invoke :'ci:verify_status'
28
+ ...
29
+
30
+ to :launch do
31
+ ...
32
+ end
33
+ end
34
+ end
35
+
36
+ ## Options
37
+
38
+ | Name | Description |
39
+ | ---------------------------- | ----------------------------------- |
40
+ | `circle_token` | CircleCI API token |
41
+ | `circle_username` | CircleCI project username |
42
+ | `circle_project` | CircleCI project name |
43
+
44
+ ## Contributing
45
+
46
+ 1. Fork it ( https://github.com/seandong/mina-ci/fork )
47
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
48
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
49
+ 4. Push to the branch (`git push origin my-new-feature`)
50
+ 5. Create a new Pull Request
@@ -24,16 +24,14 @@ set_default :circle_project, nil
24
24
 
25
25
  namespace :ci do
26
26
 
27
- desc 'Verify CircleCI building status.'
28
- task :verify_status => :evironment do
29
- queue %[echo "-----> check CircleCI status"]
30
- die 0, 'Please set your `:circle_token`.' unless circle_token
31
- die 0, 'Please set your `:circle_username`.' unless circle_username
32
- die 0, 'Please set your `:circle_project`.' unless circle_project
33
-
34
- unless %w(success fixed).include?(cricle_status)
35
- die 1, "CircleCI not passed (#{cricle_status}), please check and fix problem first."
36
- end
27
+ desc 'Verify CircleCI build status.'
28
+ task :verify_status => :environment do
29
+ queue %[echo "-----> check CircleCI build status"]
30
+ die 0, 'Please set `:circle_token`.' unless circle_token
31
+ die 0, 'Please set `:circle_username`.' unless circle_username
32
+ die 0, 'Please set `:circle_project`.' unless circle_project
33
+
34
+ die 0, "CircleCI build failed. current status: #{cricle_status}), please check and fix it first." unless %w(success fixed).include?(cricle_status)
37
35
  end
38
36
 
39
37
  private
@@ -43,7 +41,7 @@ namespace :ci do
43
41
  end
44
42
 
45
43
  def circle_repsonse
46
- JSON.parse `curl -H 'Accept: application/json' #{circle_url}`
44
+ JSON.parse `curl -s -H 'Accept: application/json' #{circle_url}`
47
45
  end
48
46
 
49
47
  def cricle_status
@@ -1,5 +1,5 @@
1
1
  module Mina
2
2
  module Ci
3
- VERSION = '0.0.3'
3
+ VERSION = '0.0.9'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mina-ci
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Dong