ruby_git_issue 1.1.0 → 1.1.1

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +80 -92
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 006d3fe62b5731a39bc61d26ab1da17617e9315482139876cf2d363d31f04457
4
- data.tar.gz: b7eb6b364c8d70e58eb020d2a655eba34d9814a23ffcda7d866d5f9d278022b1
3
+ metadata.gz: 863250a8fd2a9ccdc1c876b9fc7529e5cca6d49806cbefc7abd45c86780dcee9
4
+ data.tar.gz: 1f23afa5209342d4c98392d5ca4aeebfaa5c6ed66d8d7f324a56b7f455b449f9
5
5
  SHA512:
6
- metadata.gz: 7eea7ef1b021c28134d5d42b443032715197eee8882179368c0117c04d71a711234fbdce86ffef48a13ce353a201115845dd2e5b31788efce2dd73f512be170b
7
- data.tar.gz: d2a04811172c5aa9c9b9a36b9eed2dab258e265afccdbde3ad1b40bc1128efa207ea91118ad4118d6ec87db97462142a9008fcfe39d2f99854be3f22eaeef32e
6
+ metadata.gz: 9a4e21beee0131208fe24baa347746769499f4352b35c422629b479b08915123b08cce9bb9edd0d094eb6915d2d334d7394d7dd96c55bd2114aef19d2bfaa06d
7
+ data.tar.gz: d177d10db2b6ea7ef27dac49e86bab253713b36e5673d05a1db2cdec40d4fd4179d4dbff658690b55a2361dff8a69762200d6b49b7438458cede25c03197992c
data/README.md CHANGED
@@ -9,104 +9,92 @@ It can tag, assign to members, assign to organization project, and also set the
9
9
  Things you may want to cover:
10
10
 
11
11
  ## Installation
12
-
13
-   - Install via Rubygems
14
-
15
-     `gem install ruby_git_issue`
16
-
17
-    OR
18
-
19
-   - Add to you Gemfile
20
-
21
-     `gem 'ruby_git_issue'`
22
-
23
-   - Access the library in Ruby
24
-     `require 'ruby_git_issue'`
25
-
12
+ Install via Rubygems
13
+ ```ruby
14
+ gem install ruby_git_issue
15
+ ```
16
+ OR
17
+ Add to you Gemfile
18
+ ```ruby
19
+ gem 'ruby_git_issue'
20
+ ```
21
+ Access the library in Ruby
22
+ ```ruby
23
+ require 'ruby_git_issue'
24
+ ```
26
25
  ## Usage
27
-
28
-    Before using the gem, we need to get the repository's *ADMIN* `token`. With this only we can have access to the features of the gem
29
-
30
-    Repository Users can also create an issue with this gem but, usage will be limited to issue creation only
31
-
32
-   To get the token goto [Developer Settings](https://github.com/settings/apps) >  [Personal Access token](https://github.com/settings/tokens) > Generate new token
33
-
34
-
35
-   options = { token: "above_mentioned", repo: "on_which_repo_you_want_issu", organization: "organization", exception_data: e, request: request}
36
-   client = RubyGitIssue.new(options)
37
-   client.issue_options = { title: "Exception[#{Rails.env}]": e.message, labels: ["BUG", "Enhancement"], assignees: ['github_repo_username_1', 'github_repo_username_2'] }
38
-
26
+ Before using the gem, we need to get the repository's *ADMIN* `token`. With this only we can have access to the features of the gem
27
+ Repository Users can also create an issue with this gem but, usage will be limited to issue creation only
28
+ To get the token goto [Developer Settings](https://github.com/settings/apps) >  [Personal Access token](https://github.com/settings/tokens) > Generate new token
29
+
30
+ ```ruby
31
+ options = { token: "above_mentioned", repo: "on_which_repo_you_want_issu", organization: "organization", exception_data: e, request: request}
32
+ client = RubyGitIssue.new(options)
33
+ client.issue_options = { title: "Exception[#{Rails.env}]": e.message, labels: ["BUG", "Enhancement"], assignees: ['github_repo_username_1', 'github_repo_username_2'] }
34
+ ```
39
35
  #### Generate issue on repo
40
36
    `generate_issue` method will generate the issue for you on GitHub
41
-
42
-   `client.generate_issue`
43
-
37
+ ```ruby
38
+ client.generate_issue
39
+ ```
44
40
  #### OR
45
-
46
41
  #### Generate issue on (organization) project
47
-
48
42
    `generate_issue(git_column)` method will generate the issue for you and assign to a project board as well
49
-
50
43
     To get the `git_column` we need to follow below process
51
-
52
-    `projects = client.get_org_projects`
53
-
54
-    find the id of the project from above call
55
-
56
-    There will be columns and cards on the project
57
-
58
-    With project's id get project's columns
59
-
60
-    `get_projects_columns(project_id)`
61
-
62
-    find the id of the column from the above call and
63
-
64
-    `client.generate_issue(git_column)`
44
+ ```ruby
45
+ projects = client.get_org_projects
46
+ ```
47
+ Find the id of the project from above call. There will be columns and cards on the project. With project's id get project's columns.
48
+ ```ruby
49
+ client.get_projects_columns(project_id)
50
+ ```
51
+ Find the id of the column from the above call and
52
+ ```ruby
53
+ client.generate_issue(git_column)
54
+ ```
65
55
 
66
56
  ### Setup middelware on exception_notification
67
-
68
- * Install gem '[exception_notification](https://github.com/smartinez87/exception_notification)'
69
-
70
- * Setup middelware
71
-
72
- * Add file to `lib/exception_notifier/github_notifier.rb`
73
-
74
- require 'action_dispatch'
75
- module ExceptionNotifier
76
- class GithubNotifier < BaseNotifier
77
-
78
- class MissingController
79
- def method_missing(*args, &block)
80
- end
81
- end
82
-
83
- def initialize(options)
84
- @default_options = options
85
- end
86
-
87
- def call(exception, options={})
88
- unless options[:env].nil?
89
- request = ActionDispatch::Request.new(options[:env])
90
- git_options = @default_options.merge!({exception_data: exception, request: request})
91
- client = RubyGitIssue.new(git_options)
92
- client.issue_options = { title: "#{@default_options[:prefix]}: #{exception.message}",
93
- labels: @default_options[:labels],
94
- assignees: @default_options[:assignees] }
95
- client.generate_issue(@default_options[:column_id])
96
- end
97
- end
98
- end
99
- end
100
-
101
- * Add middelware to envrionment file on rails project
102
-
103
- Rails.application.config.middleware.use ExceptionNotification::Rack,
104
- github: {
105
- prefix: 'Exception [Development]: ',
106
- repo: ENV['GIT_REPO'],
107
- token: ENV['GIT_TOKEN'],
108
- organization: ENV['GIT_ORG'],
109
- labels: ["BUG"],
110
- assignees: [ENV['GIT_ASSIGNEES']],
111
- column_id: ENV['GIT_COLUMN']
112
- }
57
+ * Install gem '[exception_notification](https://github.com/smartinez87/exception_notification)'
58
+ * Setup middelware
59
+ Add file to `lib/exception_notifier/github_notifier.rb`
60
+ ```ruby
61
+ require 'action_dispatch'
62
+ module ExceptionNotifier
63
+ class GithubNotifier < BaseNotifier
64
+
65
+ class MissingController
66
+ def method_missing(*args, &block)
67
+ end
68
+ end
69
+
70
+ def initialize(options)
71
+ @default_options = options
72
+ end
73
+
74
+ def call(exception, options={})
75
+ unless options[:env].nil?
76
+ request = ActionDispatch::Request.new(options[:env])
77
+ git_options = @default_options.merge!({exception_data: exception, request: request})
78
+ client = RubyGitIssue.new(git_options)
79
+ client.issue_options = { title: "#{@default_options[:prefix]}: #{exception.message}",
80
+ labels: @default_options[:labels],
81
+ assignees: @default_options[:assignees] }
82
+ client.generate_issue(@default_options[:column_id])
83
+ end
84
+ end
85
+ end
86
+ end
87
+ ```
88
+ Add middelware to envrionment file on rails project
89
+ ```ruby
90
+ Rails.application.config.middleware.use ExceptionNotification::Rack,
91
+ github: {
92
+ prefix: 'Exception [Development]: ',
93
+ repo: ENV['GIT_REPO'],
94
+ token: ENV['GIT_TOKEN'],
95
+ organization: ENV['GIT_ORG'],
96
+ labels: ["BUG"],
97
+ assignees: [ENV['GIT_ASSIGNEES']],
98
+ column_id: ENV['GIT_COLUMN']
99
+ }
100
+ ```
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_git_issue
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arpit Vaishnav