noclist 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -1
- data/Gemfile.lock +1 -5
- data/README.md +19 -9
- data/lib/noclist/badsec.rb +6 -2
- data/lib/noclist/version.rb +1 -1
- data/noclist.gemspec +0 -2
- data/noclist.gif +0 -0
- metadata +3 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d2b829108f6125805f8761c0bdbca1d4cc1f82d
|
4
|
+
data.tar.gz: 603247db0481b945367dd51f42eb3b9edbf40840
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2af2ec84023151edb541d8370c1c843d45a64d60268065ef1b597f5020ef3302200d34e32313953e476b12f2680a087d4e597934b4ee7c2719f08de6ed2b2d7
|
7
|
+
data.tar.gz: d8872d7aa7d3af6e07ff0ecf243c1682f523fc1e022b9eef04cf2279fc6214c8ab4883cfa27fa34bc4330999f179d2112143f1cf3a04086f571ba9584c879444
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
noclist (0.1.
|
4
|
+
noclist (0.1.2)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -11,7 +11,6 @@ GEM
|
|
11
11
|
i18n (>= 0.7, < 2)
|
12
12
|
minitest (~> 5.1)
|
13
13
|
tzinfo (~> 1.1)
|
14
|
-
artii (2.1.2)
|
15
14
|
byebug (11.0.1)
|
16
15
|
concurrent-ruby (1.1.5)
|
17
16
|
diff-lcs (1.3)
|
@@ -39,7 +38,6 @@ GEM
|
|
39
38
|
diff-lcs (>= 1.2.0, < 2.0)
|
40
39
|
rspec-support (~> 3.8.0)
|
41
40
|
rspec-support (3.8.0)
|
42
|
-
thor (0.20.0)
|
43
41
|
thread_safe (0.3.6)
|
44
42
|
tzinfo (1.2.5)
|
45
43
|
thread_safe (~> 0.1)
|
@@ -49,14 +47,12 @@ PLATFORMS
|
|
49
47
|
|
50
48
|
DEPENDENCIES
|
51
49
|
activesupport
|
52
|
-
artii
|
53
50
|
bundler (~> 1.17)
|
54
51
|
byebug
|
55
52
|
httparty
|
56
53
|
noclist!
|
57
54
|
rake (~> 10.0)
|
58
55
|
rspec (~> 3.0)
|
59
|
-
thor (= 0.20.0)
|
60
56
|
|
61
57
|
BUNDLED WITH
|
62
58
|
1.17.1
|
data/README.md
CHANGED
@@ -1,23 +1,33 @@
|
|
1
|
-
# Noclist 🌌
|
2
|
-
|
3
|
-
Put your Ruby code in the file `lib/noclist`. To experiment with that code, run `bin/console` for an interactive prompt.
|
1
|
+
# Noclist 🌌
|
2
|
+
_Retrieve a list of VIP user IDs and print it to STDOUT in JSON format_
|
4
3
|
|
5
4
|
## Installation
|
6
5
|
|
6
|
+
![how to set up noclist gem locally](noclist.gif)
|
7
|
+
|
7
8
|
Assuming your machine is set up for the Ruby ecosystem:
|
8
9
|
|
9
|
-
$ gem install noclist
|
10
10
|
$ bin/setup
|
11
|
+
$ bundle exec rake install
|
12
|
+
|
13
|
+
_Make sure to run the server before running the gem or test-suite_:
|
14
|
+
|
15
|
+
$ docker run --rm -p 8888:8888 adhocteam/noclist
|
16
|
+
|
17
|
+
## Gem Usage
|
18
|
+
|
19
|
+
$ noclist
|
11
20
|
|
12
|
-
##
|
21
|
+
## Running tests
|
13
22
|
|
14
|
-
|
23
|
+
To run the entire test-suite:
|
15
24
|
|
16
|
-
|
25
|
+
$ bundle exec rspec spec
|
17
26
|
|
18
|
-
|
27
|
+
## Debugging 🐛
|
19
28
|
|
20
|
-
|
29
|
+
- Insert `require 'byebug'` at the top of a file (paying particular attention to `badsec.rb` and `cli.rb`), and throw in a `byebug` statement as your break-point.
|
30
|
+
- Alternatively, run `bin/console` for an interactive prompt for debugging purposes.
|
21
31
|
|
22
32
|
## License
|
23
33
|
|
data/lib/noclist/badsec.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require "active_support/all"
|
2
2
|
require "byebug"
|
3
3
|
require "HTTParty"
|
4
|
-
require
|
4
|
+
require "digest"
|
5
5
|
|
6
6
|
module Badsec
|
7
7
|
class User
|
@@ -43,7 +43,7 @@ module Badsec
|
|
43
43
|
if users_response.code != 200
|
44
44
|
STDERR.puts "Response: #{users_response.code}, #{users_response.message}"
|
45
45
|
else
|
46
|
-
print
|
46
|
+
print format(users_response) unless ENV['GEM_ENV'] == 'TEST'
|
47
47
|
end
|
48
48
|
|
49
49
|
users_response
|
@@ -58,5 +58,9 @@ module Badsec
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
end
|
61
|
+
|
62
|
+
def format(users_response)
|
63
|
+
JSON.parse(users_response.body.split.to_json)
|
64
|
+
end
|
61
65
|
end
|
62
66
|
end
|
data/lib/noclist/version.rb
CHANGED
data/noclist.gemspec
CHANGED
@@ -41,7 +41,5 @@ Gem::Specification.new do |spec|
|
|
41
41
|
spec.add_development_dependency "rspec", "~> 3.0"
|
42
42
|
spec.add_development_dependency "activesupport"
|
43
43
|
spec.add_development_dependency "byebug"
|
44
|
-
spec.add_development_dependency "artii"
|
45
|
-
spec.add_development_dependency "thor", "0.20.0"
|
46
44
|
spec.add_development_dependency "httparty"
|
47
45
|
end
|
data/noclist.gif
ADDED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: noclist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marceline the Vampire Queen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -80,34 +80,6 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: artii
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: thor
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - '='
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: 0.20.0
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - '='
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: 0.20.0
|
111
83
|
- !ruby/object:Gem::Dependency
|
112
84
|
name: httparty
|
113
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -148,6 +120,7 @@ files:
|
|
148
120
|
- lib/noclist/cli.rb
|
149
121
|
- lib/noclist/version.rb
|
150
122
|
- noclist.gemspec
|
123
|
+
- noclist.gif
|
151
124
|
homepage: https://adventuretime.fandom.com/wiki/Marceline
|
152
125
|
licenses:
|
153
126
|
- MIT
|