gist_updater 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +2 -0
- data/.rubocop.yml +1285 -0
- data/.ruby-version +1 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +8 -0
- data/LICENSE.txt +21 -0
- data/README.md +74 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/circle.yml +7 -0
- data/disabled.yml +122 -0
- data/enabled.yml +1492 -0
- data/exe/gist_updater +6 -0
- data/gist_updater.gemspec +32 -0
- data/gist_updater.yml.example +16 -0
- data/lib/gist_updater/commands.rb +63 -0
- data/lib/gist_updater/content.rb +40 -0
- data/lib/gist_updater/content_factory.rb +14 -0
- data/lib/gist_updater/version.rb +5 -0
- data/lib/gist_updater.rb +6 -0
- metadata +151 -0
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.3.1
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at masutaka.net@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Takashi Masuda
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# GistUpdater
|
2
|
+
|
3
|
+
Updates your Gist files which are defined in YAML
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'gist_updater'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install gist_updater
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
```
|
24
|
+
gist_updater commands:
|
25
|
+
gist_updater help [COMMAND] # Describe available commands or one specific command
|
26
|
+
gist_updater update # Update your Gist files (default)
|
27
|
+
gist_updater version # Display version
|
28
|
+
|
29
|
+
Options:
|
30
|
+
y, [--yaml=YAML] # User definition YAML file
|
31
|
+
# Default: gist_updater.yml
|
32
|
+
u, [--user=USER] # GitHub username
|
33
|
+
t, [--token=TOKEN] # GitHub personal access token
|
34
|
+
d, [--debug], [--no-debug] # Debug mode
|
35
|
+
```
|
36
|
+
|
37
|
+
### YAML format
|
38
|
+
|
39
|
+
```yaml
|
40
|
+
-
|
41
|
+
- <gist_id1>
|
42
|
+
- <path to file1>
|
43
|
+
-
|
44
|
+
- <gist_id2>
|
45
|
+
- <path to file2>
|
46
|
+
```
|
47
|
+
|
48
|
+
For example,
|
49
|
+
|
50
|
+
```yaml
|
51
|
+
-
|
52
|
+
# https://gist.github.com/masutaka/8177244
|
53
|
+
- 8177244
|
54
|
+
- .emacs.d/init.el
|
55
|
+
-
|
56
|
+
# https://gist.github.com/masutaka/9642146
|
57
|
+
- 9642146
|
58
|
+
- bin/my-brew-bundle
|
59
|
+
```
|
60
|
+
|
61
|
+
## Development
|
62
|
+
|
63
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
64
|
+
|
65
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
66
|
+
|
67
|
+
## Contributing
|
68
|
+
|
69
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/gist_updater. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
70
|
+
|
71
|
+
|
72
|
+
## License
|
73
|
+
|
74
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "gist_updater"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/circle.yml
ADDED
data/disabled.yml
ADDED
@@ -0,0 +1,122 @@
|
|
1
|
+
# These are all the cops that are disabled in the default configuration.
|
2
|
+
|
3
|
+
# By default, the rails cops are not run. Override in project or home
|
4
|
+
# directory .rubocop.yml files, or by giving the -R/--rails option.
|
5
|
+
Rails:
|
6
|
+
Enabled: false
|
7
|
+
|
8
|
+
Rails/SaveBang:
|
9
|
+
Description: 'Identifies possible cases where Active Record save! or related should be used.'
|
10
|
+
StyleGuide: 'https://github.com/bbatsov/rails-style-guide#save-bang'
|
11
|
+
Enabled: false
|
12
|
+
|
13
|
+
Style/AutoResourceCleanup:
|
14
|
+
Description: 'Suggests the usage of an auto resource cleanup version of a method (if available).'
|
15
|
+
Enabled: false
|
16
|
+
|
17
|
+
Style/CollectionMethods:
|
18
|
+
Description: 'Preferred collection methods.'
|
19
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size'
|
20
|
+
Enabled: false
|
21
|
+
|
22
|
+
Style/Copyright:
|
23
|
+
Description: 'Include a copyright notice in each file before any code.'
|
24
|
+
Enabled: false
|
25
|
+
|
26
|
+
Style/Documentation:
|
27
|
+
Description: 'Document classes and non-namespace modules.'
|
28
|
+
Enabled: false
|
29
|
+
Exclude:
|
30
|
+
- 'spec/**/*'
|
31
|
+
- 'test/**/*'
|
32
|
+
|
33
|
+
Style/DocumentationMethod:
|
34
|
+
Description: 'Public methods.'
|
35
|
+
Enabled: false
|
36
|
+
Exclude:
|
37
|
+
- 'spec/**/*'
|
38
|
+
- 'test/**/*'
|
39
|
+
|
40
|
+
Style/Encoding:
|
41
|
+
Description: 'Use UTF-8 as the source file encoding.'
|
42
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#utf-8'
|
43
|
+
Enabled: false
|
44
|
+
|
45
|
+
Style/FirstArrayElementLineBreak:
|
46
|
+
Description: >-
|
47
|
+
Checks for a line break before the first element in a
|
48
|
+
multi-line array.
|
49
|
+
Enabled: false
|
50
|
+
|
51
|
+
Style/FirstHashElementLineBreak:
|
52
|
+
Description: >-
|
53
|
+
Checks for a line break before the first element in a
|
54
|
+
multi-line hash.
|
55
|
+
Enabled: false
|
56
|
+
|
57
|
+
Style/FirstMethodArgumentLineBreak:
|
58
|
+
Description: >-
|
59
|
+
Checks for a line break before the first argument in a
|
60
|
+
multi-line method call.
|
61
|
+
Enabled: false
|
62
|
+
|
63
|
+
Style/FirstMethodParameterLineBreak:
|
64
|
+
Description: >-
|
65
|
+
Checks for a line break before the first parameter in a
|
66
|
+
multi-line method parameter definition.
|
67
|
+
Enabled: false
|
68
|
+
|
69
|
+
Style/ImplicitRuntimeError:
|
70
|
+
Description: >-
|
71
|
+
Use `raise` or `fail` with an explicit exception class and
|
72
|
+
message, rather than just a message.
|
73
|
+
Enabled: false
|
74
|
+
|
75
|
+
Style/InlineComment:
|
76
|
+
Description: 'Avoid trailing inline comments.'
|
77
|
+
Enabled: false
|
78
|
+
|
79
|
+
Style/MethodCalledOnDoEndBlock:
|
80
|
+
Description: 'Avoid chaining a method call on a do...end block.'
|
81
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
|
82
|
+
Enabled: false
|
83
|
+
|
84
|
+
Style/MissingElse:
|
85
|
+
Description: >-
|
86
|
+
Require if/case expressions to have an else branches.
|
87
|
+
If enabled, it is recommended that
|
88
|
+
Style/UnlessElse and Style/EmptyElse be enabled.
|
89
|
+
This will conflict with Style/EmptyElse if
|
90
|
+
Style/EmptyElse is configured to style "both"
|
91
|
+
Enabled: false
|
92
|
+
EnforcedStyle: both
|
93
|
+
SupportedStyles:
|
94
|
+
# if - warn when an if expression is missing an else branch
|
95
|
+
# case - warn when a case expression is missing an else branch
|
96
|
+
# both - warn when an if or case expression is missing an else branch
|
97
|
+
- if
|
98
|
+
- case
|
99
|
+
- both
|
100
|
+
|
101
|
+
Style/MultilineAssignmentLayout:
|
102
|
+
Description: 'Check for a newline after the assignment operator in multi-line assignments.'
|
103
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-conditional-assignment'
|
104
|
+
Enabled: false
|
105
|
+
|
106
|
+
Style/OptionHash:
|
107
|
+
Description: "Don't use option hashes when you can use keyword arguments."
|
108
|
+
Enabled: false
|
109
|
+
|
110
|
+
Style/Send:
|
111
|
+
Description: 'Prefer `Object#__send__` or `Object#public_send` to `send`, as `send` may overlap with existing methods.'
|
112
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#prefer-public-send'
|
113
|
+
Enabled: false
|
114
|
+
|
115
|
+
Style/StringMethods:
|
116
|
+
Description: 'Checks if configured preferred methods are used over non-preferred.'
|
117
|
+
Enabled: false
|
118
|
+
|
119
|
+
Style/SymbolArray:
|
120
|
+
Description: 'Use %i or %I for arrays of symbols.'
|
121
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-i'
|
122
|
+
Enabled: false
|