ruby-bitly 0.1.2 → 0.1.3

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 (5) hide show
  1. data/CHANGELOG +4 -0
  2. data/VERSION +1 -1
  3. data/bin/bitly +10 -1
  4. data/ruby-bitly.gemspec +1 -1
  5. metadata +3 -3
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.1.3
2
+
3
+ - Copy to clipboard for Mac users
4
+
1
5
  # 0.1.0
2
6
 
3
7
  - Moving read file ~/.bitly from Bitly class to command line script
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
data/bin/bitly CHANGED
@@ -28,7 +28,12 @@ class App
28
28
  output_options if options.verbose
29
29
 
30
30
  post_process_options and process_arguments
31
- puts "#{options.message} #{process_command}".strip
31
+
32
+ result = process_command
33
+
34
+ puts "#{options.message} #{result}".strip
35
+
36
+ copy_to_clipboard(result)
32
37
  else
33
38
  output_help("ERROR: Invalid options", 'examples')
34
39
  end
@@ -36,6 +41,10 @@ class App
36
41
 
37
42
  protected
38
43
 
44
+ def copy_to_clipboard(value)
45
+ system "printf '#{value.strip}' 2> /dev/null | pbcopy 2> /dev/null" if RUBY_PLATFORM[/darwin/]
46
+ end
47
+
39
48
  def load_account_data
40
49
  begin
41
50
  account_data = YAML.load(File.read(ACCOUNT_FILE_PATH))
data/ruby-bitly.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ruby-bitly}
8
- s.version = "0.1.2"
8
+ s.version = "0.1.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["rafaeldx7"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-bitly
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - rafaeldx7