tweetskim 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -36,23 +36,24 @@ module Tweetskim
36
36
 
37
37
  SETTINGS_FILE_PATH = File.expand_path "~/.tweetskim/default-account"
38
38
 
39
+ require "fileutils"
40
+
39
41
  def initialize
40
- if !Dir[" ~/.tweetskim"].empty?
41
- `mkdir ~/.tweetskim`
42
- end
42
+ FileUtils.mkdir_p(File.expand_path("~/.tweetskim"))
43
+ FileUtils.touch SETTINGS_FILE_PATH
43
44
  end
44
45
 
45
46
  def load
46
- if !File.exists? SETTINGS_FILE_PATH
47
- `touch #{SETTINGS_FILE_PATH}`
47
+ File.open SETTINGS_FILE_PATH, "r" do |filebody|
48
+ YAML::load(filebody) || SETTINGS_TEMPLATE
48
49
  end
49
- yml_str = `cat #{SETTINGS_FILE_PATH}`
50
- YAML::load(yml_str) || SETTINGS_TEMPLATE
51
50
  end
52
51
 
53
52
  def save(settings)
54
53
  yml_str = YAML::dump(settings)
55
- `echo "#{yml_str}" > #{SETTINGS_FILE_PATH}`
54
+ File.open SETTINGS_FILE_PATH, "w" do |filebody|
55
+ filebody.write yml_str
56
+ end
56
57
  end
57
58
 
58
59
  def user_credentials_stored?
@@ -1,3 +1,3 @@
1
1
  module Tweetskim
2
- VERSION = "0.4.0"
2
+ VERSION = "0.5.0"
3
3
  end
data/tweetskim.gemspec CHANGED
@@ -7,9 +7,9 @@ Gem::Specification.new do |s|
7
7
  s.version = Tweetskim::VERSION
8
8
  s.authors = ["Thomas Kjeldahl Nilsson"]
9
9
  s.email = ["thomas@kjeldahlnilsson.net"]
10
- s.homepage = ""
10
+ s.homepage = "https://github.com/thomanil/tweetskim"
11
11
  s.summary = %q{A stripped down CLI utility for reading tweets}
12
- s.description = %q{Usage: tweetskim [username]}
12
+ s.description = %q{Usage: tweetskim [options]}
13
13
 
14
14
  s.rubyforge_project = "tweetskim"
15
15
 
metadata CHANGED
@@ -1,89 +1,68 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: tweetskim
3
- version: !ruby/object:Gem::Version
4
- hash: 15
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.5.0
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 4
9
- - 0
10
- version: 0.4.0
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Thomas Kjeldahl Nilsson
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-03-05 00:00:00 +01:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2012-03-06 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: twitter
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &18415540 !ruby/object:Gem::Requirement
25
17
  none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
33
22
  type: :runtime
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: oauth
37
23
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *18415540
25
+ - !ruby/object:Gem::Dependency
26
+ name: oauth
27
+ requirement: &18415120 !ruby/object:Gem::Requirement
39
28
  none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- hash: 3
44
- segments:
45
- - 0
46
- version: "0"
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
47
33
  type: :runtime
48
- version_requirements: *id002
49
- - !ruby/object:Gem::Dependency
50
- name: OptionParser
51
34
  prerelease: false
52
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *18415120
36
+ - !ruby/object:Gem::Dependency
37
+ name: OptionParser
38
+ requirement: &18414700 !ruby/object:Gem::Requirement
53
39
  none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- hash: 3
58
- segments:
59
- - 0
60
- version: "0"
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
61
44
  type: :runtime
62
- version_requirements: *id003
63
- - !ruby/object:Gem::Dependency
64
- name: mocha
65
45
  prerelease: false
66
- requirement: &id004 !ruby/object:Gem::Requirement
46
+ version_requirements: *18414700
47
+ - !ruby/object:Gem::Dependency
48
+ name: mocha
49
+ requirement: &18414280 !ruby/object:Gem::Requirement
67
50
  none: false
68
- requirements:
69
- - - ">="
70
- - !ruby/object:Gem::Version
71
- hash: 3
72
- segments:
73
- - 0
74
- version: "0"
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
75
55
  type: :development
76
- version_requirements: *id004
77
- description: "Usage: tweetskim [username]"
78
- email:
56
+ prerelease: false
57
+ version_requirements: *18414280
58
+ description: ! 'Usage: tweetskim [options]'
59
+ email:
79
60
  - thomas@kjeldahlnilsson.net
80
- executables:
61
+ executables:
81
62
  - tweetskim
82
63
  extensions: []
83
-
84
64
  extra_rdoc_files: []
85
-
86
- files:
65
+ files:
87
66
  - .gitignore
88
67
  - Gemfile
89
68
  - README.md
@@ -95,39 +74,28 @@ files:
95
74
  - test/test_helper.rb
96
75
  - test/test_tweetskim.rb
97
76
  - tweetskim.gemspec
98
- has_rdoc: true
99
- homepage: ""
77
+ homepage: https://github.com/thomanil/tweetskim
100
78
  licenses: []
101
-
102
79
  post_install_message:
103
80
  rdoc_options: []
104
-
105
- require_paths:
81
+ require_paths:
106
82
  - lib
107
- required_ruby_version: !ruby/object:Gem::Requirement
83
+ required_ruby_version: !ruby/object:Gem::Requirement
108
84
  none: false
109
- requirements:
110
- - - ">="
111
- - !ruby/object:Gem::Version
112
- hash: 3
113
- segments:
114
- - 0
115
- version: "0"
116
- required_rubygems_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ! '>='
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ required_rubygems_version: !ruby/object:Gem::Requirement
117
90
  none: false
118
- requirements:
119
- - - ">="
120
- - !ruby/object:Gem::Version
121
- hash: 3
122
- segments:
123
- - 0
124
- version: "0"
91
+ requirements:
92
+ - - ! '>='
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
125
95
  requirements: []
126
-
127
96
  rubyforge_project: tweetskim
128
- rubygems_version: 1.4.2
97
+ rubygems_version: 1.8.15
129
98
  signing_key:
130
99
  specification_version: 3
131
100
  summary: A stripped down CLI utility for reading tweets
132
101
  test_files: []
133
-