turksatkablo_cli 0.3.0-x64-mingw32

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.
@@ -0,0 +1,72 @@
1
+
2
+ describe TurksatkabloCli::OnlineOperations::Helpers do
3
+ subject { described_class }
4
+
5
+ context '#check_ruby_version' do
6
+ it 'returns ruby version when correct version >= 2.2.0 installed' do
7
+ expect(subject.check_ruby_version("2.4.2")).to be >= "2.2.0"
8
+ end
9
+
10
+ it 'abort with error message when unsupported ruby version (< 2.2.0) installed' do
11
+ expect { subject.check_ruby_version("2.1.0") }.to raise_error(SystemExit)
12
+ end
13
+ end
14
+
15
+ context '#check_is_installed?' do
16
+ it 'returns true when phantomjs is in path' do
17
+ expect(subject.check_is_installed?("phantomjs", TurksatkabloCli::OnlineOperations::Enums::PHANTOM_JS_REQUIRED)).to be_truthy
18
+ end
19
+
20
+ it 'abort with error message because phantom_jsx can not be in path' do
21
+ expect { subject.check_is_installed?("phantom_jsx", "phantom_jsx can not be in path") }.to raise_error(SystemExit)
22
+ end
23
+ end
24
+
25
+ context '#which' do
26
+ it 'returns ruby\'s path when ruby is in path' do
27
+ expect(subject.which("ruby")).to be_instance_of(String)
28
+ end
29
+ end
30
+
31
+ context '#require_all' do
32
+ before {described_class.require_all("./spec/support/required_all")}
33
+
34
+ it 'needed files' do
35
+ notifier = class_double("ConsoleNotifier").as_stubbed_const
36
+ expect(notifier).to receive(:notify).with("suspended as")
37
+ user = User.new
38
+ user.suspend!
39
+
40
+ end
41
+ end
42
+
43
+ context '#agent' do
44
+ before(:all) do
45
+ require 'turksatkablo_cli/online_operations/agent'
46
+ require 'init/poltergeist'
47
+ end
48
+
49
+ it 'returns instance of Agent' do
50
+ expect(subject.agent).to be_instance_of(TurksatkabloCli::OnlineOperations::Agent)
51
+ end
52
+
53
+ it 'initializes capybara session w/ poltergeist' do
54
+ expect(subject.agent.session).to be_instance_of(Capybara::Session)
55
+ end
56
+ end
57
+
58
+ context '#add_line' do
59
+ it 'returns new line' do
60
+ expect do
61
+ subject.add_line
62
+ end.to output("\n").to_stdout
63
+ end
64
+ end
65
+
66
+ context '#internet_connection?' do
67
+ it 'returns false when blank address specified' do
68
+ expect(subject.internet_connection?('')).to be_falsey
69
+ end
70
+ end
71
+
72
+ end
@@ -0,0 +1,30 @@
1
+
2
+
3
+ require 'simplecov'
4
+
5
+ SimpleCov.start do
6
+ add_filter '/spec/'
7
+ end
8
+
9
+ require 'turksatkablo_cli/online_operations/helpers'
10
+ require 'turksatkablo_cli/online_operations/enums'
11
+ require 'turksatkablo_cli/online_operations/version'
12
+
13
+ module SpecHelper
14
+ end
15
+
16
+ RSpec.configure do |config|
17
+ config.expect_with :rspec do |expectations|
18
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
19
+ end
20
+
21
+ config.mock_with :rspec do |mocks|
22
+ mocks.verify_partial_doubles = true
23
+ end
24
+
25
+ config.shared_context_metadata_behavior = :apply_to_host_groups
26
+ config.include(SpecHelper)
27
+
28
+ config.before(:suite) do
29
+ end
30
+ end
@@ -0,0 +1,5 @@
1
+ class ConsoleNotifier
2
+ def self.notify(message)
3
+ puts message
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class User
2
+ def suspend!
3
+ ConsoleNotifier.notify("suspended as")
4
+ end
5
+ end
@@ -0,0 +1,7 @@
1
+ describe TurksatkabloCli::OnlineOperations do
2
+
3
+ it 'returns turksatkablo_cli version' do
4
+ stub_const("VERSION", "0.3.0")
5
+ expect(VERSION).to eq(subject::VERSION)
6
+ end
7
+ end
@@ -0,0 +1,52 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "turksatkablo_cli/online_operations/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "turksatkablo_cli"
8
+ spec.version = TurksatkabloCli::OnlineOperations::VERSION
9
+ spec.authors = ["Samet Gunaydin"]
10
+ spec.email = ["rokumatsumoto@gmail.com"]
11
+
12
+ spec.summary = %q{Türksat Kablo Online İşlemler CLI}
13
+ spec.description = %q{A command-line interface for the Türksat Kablo Online İşlemler - https://online.turksatkablo.com.tr/}
14
+ spec.homepage = "https://github.com/rokumatsumoto/turksatkablo_cli"
15
+ spec.license = "MIT"
16
+
17
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
19
+ if spec.respond_to?(:metadata)
20
+ spec.metadata["allowed_push_host"] = "https://rubygems.org/"
21
+ else
22
+ raise "RubyGems 2.0 or newer is required to protect against " \
23
+ "public gem pushes."
24
+ end
25
+
26
+ # spec.files = `git ls-files -z`.split("\x0").reject do |f|
27
+ # f.match(%r{^(test|spec|features)/})
28
+ # end
29
+
30
+ spec.platform = "x64-mingw32"
31
+
32
+ spec.required_ruby_version = '>= 2.2.0'
33
+ spec.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
34
+ spec.files = `git ls-files`.split("\n")
35
+ spec.require_paths = ["lib"]
36
+ spec.add_development_dependency "bundler", "~> 1.16"
37
+ spec.add_development_dependency "rake", "~> 10.0"
38
+ spec.add_development_dependency 'rspec', '~> 3.0'
39
+ spec.add_development_dependency 'simplecov', '~> 0'
40
+
41
+ spec.add_runtime_dependency "thor", '~> 0.20.0'
42
+ spec.add_runtime_dependency 'highline', '~> 1.7', '>= 1.7.8'
43
+ spec.add_runtime_dependency 'rack', '1.6.8'
44
+ spec.add_runtime_dependency 'rack-test', '0.7.0'
45
+ spec.add_runtime_dependency 'net-ping', '~> 2.0', '>= 2.0.2'
46
+ spec.add_runtime_dependency 'capybara', '~> 2.16', '>= 2.16.1'
47
+ spec.add_runtime_dependency 'launchy', '~> 2.4.3', '>= 2.4.3'
48
+ spec.add_runtime_dependency 'poltergeist', '~> 1.16', '>= 1.16.0'
49
+ spec.add_runtime_dependency "ruby-enum", '~> 0.7.1'
50
+ spec.add_runtime_dependency 'terminal-table', '~> 1.8', '>= 1.8.0'
51
+ spec.add_runtime_dependency 'win32-security', '~> 0.5.0'
52
+ end
metadata ADDED
@@ -0,0 +1,320 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: turksatkablo_cli
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.0
5
+ platform: x64-mingw32
6
+ authors:
7
+ - Samet Gunaydin
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-01-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.16'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.16'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: simplecov
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: thor
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 0.20.0
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 0.20.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: highline
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.7'
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: 1.7.8
93
+ type: :runtime
94
+ prerelease: false
95
+ version_requirements: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - "~>"
98
+ - !ruby/object:Gem::Version
99
+ version: '1.7'
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: 1.7.8
103
+ - !ruby/object:Gem::Dependency
104
+ name: rack
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - '='
108
+ - !ruby/object:Gem::Version
109
+ version: 1.6.8
110
+ type: :runtime
111
+ prerelease: false
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - '='
115
+ - !ruby/object:Gem::Version
116
+ version: 1.6.8
117
+ - !ruby/object:Gem::Dependency
118
+ name: rack-test
119
+ requirement: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - '='
122
+ - !ruby/object:Gem::Version
123
+ version: 0.7.0
124
+ type: :runtime
125
+ prerelease: false
126
+ version_requirements: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - '='
129
+ - !ruby/object:Gem::Version
130
+ version: 0.7.0
131
+ - !ruby/object:Gem::Dependency
132
+ name: net-ping
133
+ requirement: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - "~>"
136
+ - !ruby/object:Gem::Version
137
+ version: '2.0'
138
+ - - ">="
139
+ - !ruby/object:Gem::Version
140
+ version: 2.0.2
141
+ type: :runtime
142
+ prerelease: false
143
+ version_requirements: !ruby/object:Gem::Requirement
144
+ requirements:
145
+ - - "~>"
146
+ - !ruby/object:Gem::Version
147
+ version: '2.0'
148
+ - - ">="
149
+ - !ruby/object:Gem::Version
150
+ version: 2.0.2
151
+ - !ruby/object:Gem::Dependency
152
+ name: capybara
153
+ requirement: !ruby/object:Gem::Requirement
154
+ requirements:
155
+ - - "~>"
156
+ - !ruby/object:Gem::Version
157
+ version: '2.16'
158
+ - - ">="
159
+ - !ruby/object:Gem::Version
160
+ version: 2.16.1
161
+ type: :runtime
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - "~>"
166
+ - !ruby/object:Gem::Version
167
+ version: '2.16'
168
+ - - ">="
169
+ - !ruby/object:Gem::Version
170
+ version: 2.16.1
171
+ - !ruby/object:Gem::Dependency
172
+ name: launchy
173
+ requirement: !ruby/object:Gem::Requirement
174
+ requirements:
175
+ - - "~>"
176
+ - !ruby/object:Gem::Version
177
+ version: 2.4.3
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: 2.4.3
181
+ type: :runtime
182
+ prerelease: false
183
+ version_requirements: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: 2.4.3
188
+ - - ">="
189
+ - !ruby/object:Gem::Version
190
+ version: 2.4.3
191
+ - !ruby/object:Gem::Dependency
192
+ name: poltergeist
193
+ requirement: !ruby/object:Gem::Requirement
194
+ requirements:
195
+ - - "~>"
196
+ - !ruby/object:Gem::Version
197
+ version: '1.16'
198
+ - - ">="
199
+ - !ruby/object:Gem::Version
200
+ version: 1.16.0
201
+ type: :runtime
202
+ prerelease: false
203
+ version_requirements: !ruby/object:Gem::Requirement
204
+ requirements:
205
+ - - "~>"
206
+ - !ruby/object:Gem::Version
207
+ version: '1.16'
208
+ - - ">="
209
+ - !ruby/object:Gem::Version
210
+ version: 1.16.0
211
+ - !ruby/object:Gem::Dependency
212
+ name: ruby-enum
213
+ requirement: !ruby/object:Gem::Requirement
214
+ requirements:
215
+ - - "~>"
216
+ - !ruby/object:Gem::Version
217
+ version: 0.7.1
218
+ type: :runtime
219
+ prerelease: false
220
+ version_requirements: !ruby/object:Gem::Requirement
221
+ requirements:
222
+ - - "~>"
223
+ - !ruby/object:Gem::Version
224
+ version: 0.7.1
225
+ - !ruby/object:Gem::Dependency
226
+ name: terminal-table
227
+ requirement: !ruby/object:Gem::Requirement
228
+ requirements:
229
+ - - "~>"
230
+ - !ruby/object:Gem::Version
231
+ version: '1.8'
232
+ - - ">="
233
+ - !ruby/object:Gem::Version
234
+ version: 1.8.0
235
+ type: :runtime
236
+ prerelease: false
237
+ version_requirements: !ruby/object:Gem::Requirement
238
+ requirements:
239
+ - - "~>"
240
+ - !ruby/object:Gem::Version
241
+ version: '1.8'
242
+ - - ">="
243
+ - !ruby/object:Gem::Version
244
+ version: 1.8.0
245
+ - !ruby/object:Gem::Dependency
246
+ name: win32-security
247
+ requirement: !ruby/object:Gem::Requirement
248
+ requirements:
249
+ - - "~>"
250
+ - !ruby/object:Gem::Version
251
+ version: 0.5.0
252
+ type: :runtime
253
+ prerelease: false
254
+ version_requirements: !ruby/object:Gem::Requirement
255
+ requirements:
256
+ - - "~>"
257
+ - !ruby/object:Gem::Version
258
+ version: 0.5.0
259
+ description: A command-line interface for the Türksat Kablo Online İşlemler - https://online.turksatkablo.com.tr/
260
+ email:
261
+ - rokumatsumoto@gmail.com
262
+ executables:
263
+ - console
264
+ - setup
265
+ - turksatkablo
266
+ extensions: []
267
+ extra_rdoc_files: []
268
+ files:
269
+ - ".gitignore"
270
+ - ".rspec"
271
+ - CODE_OF_CONDUCT.md
272
+ - Gemfile
273
+ - LICENSE.txt
274
+ - README.md
275
+ - Rakefile
276
+ - bin/console
277
+ - bin/setup
278
+ - bin/turksatkablo
279
+ - lib/init/poltergeist.rb
280
+ - lib/turksatkablo_cli.rb
281
+ - lib/turksatkablo_cli/base.rb
282
+ - lib/turksatkablo_cli/online_operations/agent.rb
283
+ - lib/turksatkablo_cli/online_operations/auth.rb
284
+ - lib/turksatkablo_cli/online_operations/cli.rb
285
+ - lib/turksatkablo_cli/online_operations/commands/quota.rb
286
+ - lib/turksatkablo_cli/online_operations/enums.rb
287
+ - lib/turksatkablo_cli/online_operations/helpers.rb
288
+ - lib/turksatkablo_cli/online_operations/version.rb
289
+ - spec/helpers_spec.rb
290
+ - spec/spec_helper.rb
291
+ - spec/support/required_all/console_notifier.rb
292
+ - spec/support/required_all/user.rb
293
+ - spec/version_spec.rb
294
+ - turksatkablo_cli.gemspec
295
+ homepage: https://github.com/rokumatsumoto/turksatkablo_cli
296
+ licenses:
297
+ - MIT
298
+ metadata:
299
+ allowed_push_host: https://rubygems.org/
300
+ post_install_message:
301
+ rdoc_options: []
302
+ require_paths:
303
+ - lib
304
+ required_ruby_version: !ruby/object:Gem::Requirement
305
+ requirements:
306
+ - - ">="
307
+ - !ruby/object:Gem::Version
308
+ version: 2.2.0
309
+ required_rubygems_version: !ruby/object:Gem::Requirement
310
+ requirements:
311
+ - - ">="
312
+ - !ruby/object:Gem::Version
313
+ version: '0'
314
+ requirements: []
315
+ rubyforge_project:
316
+ rubygems_version: 2.6.13
317
+ signing_key:
318
+ specification_version: 4
319
+ summary: Türksat Kablo Online İşlemler CLI
320
+ test_files: []