bu_pr 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c1aacc4a07912c990fb2a367599300117dd172b2
4
- data.tar.gz: c1dbc28bd29391a7c19969f229bc59968e7f9ad3
3
+ metadata.gz: 54596c0e009bf87cf3ae9a97bb729ac246cfd901
4
+ data.tar.gz: f24fee9674378beb3de263aa2697cae7fe783151
5
5
  SHA512:
6
- metadata.gz: 0edbfe042b3c09f747eb8e233fb67ecc56e016638a2af06d33c1a6a88bb0f6d537c349bfe77f106d65be12b2237e324b1cd4c68cdc9cde3cbcc153197769f182
7
- data.tar.gz: 29b27b640796e5ea8bf439567553a2080c2c63db7803bd8cea940a8e5ef1ca6b239f26f220182f1db8062a4a5dd7fca547f42ef11c143f60dba71885bce9212d
6
+ metadata.gz: 958cffd7247c309166b0c49e16ad91519cb627fdf307d5eae71ce6143a863d10303325292ea3d0e258688f8c5210f2dda174d469658c773e6bf7a29e6c325f1f
7
+ data.tar.gz: b55d196699098b60c69841df8edcda067cbf0e448c252eccd7238a63794be0e1eb32efdb01adf80aeac770bf16f6f54ee52f310f2618fdbf6ed70ed5dd451425
data/README.md CHANGED
@@ -25,14 +25,31 @@ require 'bu_pr'
25
25
 
26
26
  # Setup
27
27
  BuPr.configure do |config|
28
- config.repo_name = "mmyoji/bu_pr"
29
- config.access_token = "xxx"
28
+ config.access_token = "xxx" # Required: or check ENV["BUPR_TOKEN"]
29
+ config.repo_name = "mmyoji/bu_pr" # Required: or check ENV["BUPR_REPO"]
30
+
31
+ config.base_branch = "develop" # Optional: default is 'master'
32
+ config.pr_title = "My bundle update" # Optional: default is like 'Bundle update 2016-11-13'
30
33
  end
31
34
 
32
35
  BuPr::Runner.call
33
36
  ```
34
37
 
35
- TODO: add rake task
38
+ or if you're using Rails,
39
+
40
+ ```rb
41
+ # config/initializers/bu_pr.rb
42
+ BuPr.configure do |config|
43
+ config.access_token = "xxx"
44
+ config.repo_name = "mmyoji/bu_pr"
45
+ end
46
+ ```
47
+
48
+ then run the following command
49
+
50
+ ```sh
51
+ $ bin/rake bu_pr:all
52
+ ```
36
53
 
37
54
 
38
55
  ## Contributing
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ if defined?(Rails::Railtie)
4
+ module BuPr
5
+ class Railtie < ::Rails::Railtie
6
+ rake_tasks do
7
+ load "bu_pr/tasks/bu_pr.rake"
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,6 @@
1
+ namespace :bu_pr do
2
+ desc "Run `bundle update` and create pull-request"
3
+ task all: :environment do
4
+ BuPr::Runner.call
5
+ end
6
+ end
data/lib/bu_pr/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module BuPr
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
data/lib/bu_pr.rb CHANGED
@@ -7,6 +7,8 @@ require "bu_pr/handlers/github"
7
7
 
8
8
  require "bu_pr/runner"
9
9
 
10
+ require "bu_pr/railtie"
11
+
10
12
  module BuPr
11
13
  def configure
12
14
  conf = Configuration.instance
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bu_pr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masaya Myojin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-13 00:00:00.000000000 Z
11
+ date: 2016-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: compare_linker
@@ -88,7 +88,9 @@ files:
88
88
  - lib/bu_pr/configuration.rb
89
89
  - lib/bu_pr/git.rb
90
90
  - lib/bu_pr/handlers/github.rb
91
+ - lib/bu_pr/railtie.rb
91
92
  - lib/bu_pr/runner.rb
93
+ - lib/bu_pr/tasks/bu_pr.rake
92
94
  - lib/bu_pr/version.rb
93
95
  homepage: https://github.com/mmyoji/bu_pr
94
96
  licenses: