contribution_count 0.1.0 → 0.1.2

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
  SHA256:
3
- metadata.gz: 29b96f82c70ec2af1c994563b87e41422e2e5c523459fc16e6a46abcf62582f6
4
- data.tar.gz: 71b7b1880230d143b74485b809e4d9215280de8fd531df4dc65d88e611c4bde3
3
+ metadata.gz: 0600b17970c524d60c7f97d0a738deaea4446eed1940fdd8bccab5068097259f
4
+ data.tar.gz: acb097ba2ce8d9ddc69821f742d6d7d000a3e25f02c7554bf2a673231f186ad9
5
5
  SHA512:
6
- metadata.gz: 74a6755ddbb558dbdb9eda8d9648b74dfab900864b0bf4ef242c2058b186aab67c6bd1e125ae646b813e0fa5d2ba7e2a77bd6ba88ec4a39b73c733893614713e
7
- data.tar.gz: 547717f72e683af4a38bebad09db17f7aa941d7db095a3ec5d99a8c47003d03bfdd916f7ac51a4a7940e788d8920f83bea90ac9f5c4972e535a257d56daba978
6
+ metadata.gz: 423b1df81bb556bcf0fb359975a2cc685e22d3ec8e3c177f8da9a8764d7b975bf9d28e2cbd5113fb200357a0033553923d4d8d8f9f67127ae4ebd18f1330ad91
7
+ data.tar.gz: 79c6acdd82a1296017e146c5b94f98565e72edd436a9cb9e5dfaad851677b45d9fd805613f527ae4166ac1df98807027da25599204d63d0f61592a33f54888c5
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # ContributionCount
2
- GitHub contribution count client
2
+ - GitHub contribution count client
3
+ - https://rubygems.org/gems/contribution_count
3
4
 
4
5
  ## Installation
5
6
 
@@ -19,15 +20,19 @@ Or install it yourself as:
19
20
 
20
21
  ## Usage
21
22
  ```ruby
22
- name = ContributionCount
23
+ name = "github_account_name"
23
24
  # 1year
24
25
  ContributionCount.new(name).all
25
26
  # today
26
27
  ContributionCount.new(name).today
27
28
  # yesterday
28
- ContributionCount.new(name).today
29
+ ContributionCount.new(name).yesterday
29
30
  # select date
30
31
  ContributionCount.new(name).date("yyyy-mm-dd")
32
+ # today contribution?
33
+ ContributionCount.new(name).contribution_today?
34
+ # select date contribution?
35
+ ContributionCount.new(name).contribution("yyyy-mm-dd")?
31
36
  ```
32
37
 
33
38
  ## Contributing
@@ -40,4 +45,8 @@ The gem is available as open source under the terms of the [MIT License](https:/
40
45
 
41
46
  ## Code of Conduct
42
47
 
43
- Everyone interacting in the ContributionCount project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/contribution_count/blob/master/CODE_OF_CONDUCT.md).
48
+ Fork it ( https://github.com/emono/contribution_count )
49
+ Create your feature branch (git checkout -b my-new-feature)
50
+ Commit your changes (git commit -am 'Add some feature')
51
+ Push to the branch (git push origin my-new-feature)
52
+ Create a new Pull Request
@@ -14,6 +14,11 @@ module ContributionCount
14
14
  count_hash[today]
15
15
  end
16
16
 
17
+ def contribution_today?
18
+ return false if today == 0
19
+ true
20
+ end
21
+
17
22
  def yesterday
18
23
  yesterday = (Date.today - 1).to_s
19
24
  count_hash[yesterday]
@@ -30,6 +35,11 @@ module ContributionCount
30
35
  count
31
36
  end
32
37
 
38
+ def contribution?(date_str)
39
+ return false if date(date_str) == 0
40
+ true
41
+ end
42
+
33
43
  private
34
44
  def html
35
45
  begin
@@ -1,3 +1,3 @@
1
1
  module ContributionCount
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contribution_count
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - emono