bundle-star 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/bundle-star +12 -2
  3. data/bundle-star.gemspec +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1c21e7069ddf987e021973043abe300055a84f13
4
- data.tar.gz: 39fdd236ff272221de476d404745da6791cf3a57
3
+ metadata.gz: c5b9916fa30e6208afb0bc3b51d80bbb5eef8bd3
4
+ data.tar.gz: ce3c346fc5c2835528bf0bc15770780bee4d7131
5
5
  SHA512:
6
- metadata.gz: 6b83cc7d88dc370feafd4d6f7adf064dd7bd1baa7b6ff77e017e3e3ef24c5a76f66d1c34557ccf252b8632aa3db72fb777b96b0954e42daf1535fb214dd0a1a8
7
- data.tar.gz: 5e4c631b89953cac2083b34a922fac9301343274c5c9bf619fb01363cde8d53de643382e9ff5215ad7bf8b3be4aea7f01233c100364cf475f64fdbd557962b7a
6
+ metadata.gz: d16e3f07d080f525f91233fb531a88fe1e309dfcd82adc3647e55678f7fc91e7120ab30c01f588dbb8a06f37f6bd42e37c818fcb63404ff41448240cefd93b67
7
+ data.tar.gz: d629ec3c7605eef924b5f41b064b6d17bd343231a2ef1769f93d774cce9f05e4329766412dec414f86067ceac11b1c9dc8f06dda28a5d7d0441978ed7292f0d8
@@ -16,9 +16,11 @@ module Bundler
16
16
  begin
17
17
  client = Octokit::Client.new netrc: true
18
18
  client.star repo
19
- puts "starred #{repo} (^_^)b"
19
+ message = "\e[33m"
20
+ message << (macos_higher_lion? ? "\xe2\xad\x90 " : "\xe2\x98\x85 ")
21
+ puts message + "starred #{repo} (^_^)b\e[0m"
20
22
  rescue => e
21
- puts "failed starring #{repo}, reason #{e}"
23
+ puts "\e[31mfailed starring #{repo}, reason #{e}\e[0m"
22
24
  end
23
25
  end
24
26
  end
@@ -37,6 +39,14 @@ module Bundler
37
39
  end
38
40
  end
39
41
  end
42
+
43
+ def macos_higher_lion?
44
+ unless RUBY_PLATFORM =~ /darwin/
45
+ return false
46
+ end
47
+ macos_version = `/usr/bin/sw_vers -productVersion`.chomp.slice(/\d+\.\d+/).to_f
48
+ macos_version >= 10.7
49
+ end
40
50
  end
41
51
  end
42
52
 
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "bundle-star"
7
- spec.version = "1.0.1"
7
+ spec.version = "1.0.2"
8
8
  spec.authors = ["Takayuki Matsubara"]
9
9
  spec.email = ["takayuki.1229@gmail.com"]
10
10
  spec.description = %q{Star github repositories automatically when you `bundle-star install`ed}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundle-star
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takayuki Matsubara
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-20 00:00:00.000000000 Z
11
+ date: 2013-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler