snipplr 0.0.8 → 0.0.9
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.
- data/lib/interface/bash_api.rb +8 -2
- metadata +8 -22
data/lib/interface/bash_api.rb
CHANGED
@@ -71,8 +71,14 @@ class BashAPI
|
|
71
71
|
def process
|
72
72
|
@f = ARGV.flags
|
73
73
|
FileUtils.mkdir(ENV['HOME']+'/.snipplr') if !File.exist?(ENV['HOME']+'/.snipplr')
|
74
|
-
|
75
|
-
|
74
|
+
begin
|
75
|
+
key=(@f.key ? @f.key : (IO.read(ENV['HOME']+'/.snipplr/api_key')).chomp!)
|
76
|
+
@entry=SnipplrEntry.new(key)
|
77
|
+
rescue => e
|
78
|
+
puts 'No snipplr API key found, make sure to initialize api_key file (under ~/.snipplr) or to pass in -key parameter'
|
79
|
+
return
|
80
|
+
end
|
81
|
+
|
76
82
|
process_calls
|
77
83
|
end
|
78
84
|
|
metadata
CHANGED
@@ -1,12 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snipplr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
segments:
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 8
|
9
|
-
version: 0.0.8
|
4
|
+
version: 0.0.9
|
10
5
|
platform: ruby
|
11
6
|
authors:
|
12
7
|
- Ronen Narkis
|
@@ -19,18 +14,14 @@ default_executable: snipplr
|
|
19
14
|
dependencies:
|
20
15
|
- !ruby/object:Gem::Dependency
|
21
16
|
name: optiflag
|
22
|
-
|
23
|
-
|
24
|
-
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
20
|
requirements:
|
26
21
|
- - "="
|
27
22
|
- !ruby/object:Gem::Version
|
28
|
-
segments:
|
29
|
-
- 0
|
30
|
-
- 7
|
31
23
|
version: "0.7"
|
32
|
-
|
33
|
-
version_requirements: *id001
|
24
|
+
version:
|
34
25
|
description: Snipplr gem is intended to be used as command line api to publish delete and view code entires in snipplr.com
|
35
26
|
email: narkisr@gmail.com
|
36
27
|
executables:
|
@@ -44,7 +35,6 @@ files:
|
|
44
35
|
- lib/model/server.rb
|
45
36
|
- lib/snipplr.rb
|
46
37
|
- lib/interface/bash_api.rb
|
47
|
-
- bin/snipplr
|
48
38
|
has_rdoc: true
|
49
39
|
homepage: http://github.com/narkisr/snipplr-ruby-gem
|
50
40
|
licenses: []
|
@@ -55,25 +45,21 @@ rdoc_options: []
|
|
55
45
|
require_paths:
|
56
46
|
- lib
|
57
47
|
required_ruby_version: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
48
|
requirements:
|
60
49
|
- - ">="
|
61
50
|
- !ruby/object:Gem::Version
|
62
|
-
segments:
|
63
|
-
- 0
|
64
51
|
version: "0"
|
52
|
+
version:
|
65
53
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
54
|
requirements:
|
68
55
|
- - ">="
|
69
56
|
- !ruby/object:Gem::Version
|
70
|
-
segments:
|
71
|
-
- 0
|
72
57
|
version: "0"
|
58
|
+
version:
|
73
59
|
requirements: []
|
74
60
|
|
75
61
|
rubyforge_project:
|
76
|
-
rubygems_version: 1.3.
|
62
|
+
rubygems_version: 1.3.5
|
77
63
|
signing_key:
|
78
64
|
specification_version: 3
|
79
65
|
summary: Command line interface for snipplr
|