oak-api 0.1.0

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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 42742f45f4e185f8a2ca56d893f1f27da0a9b00c321a5260e90d95b74556d31c
4
+ data.tar.gz: 0b8e7861ea2bf38585fcf42be718941c0f0caeb5a847e62eccf18b3d90f5fc5a
5
+ SHA512:
6
+ metadata.gz: 69cd81baf442638b28f14729011a9c6173fdf2acc19de62ffc449690e81ca01b8defa9f029353cd2dfc8cfcab7964c33613cf02c3236889105741630fbd93725
7
+ data.tar.gz: df97d1fee1917a92d8e7cf2aab598fd9113c60c37ec6f1c2acd4fde63a1e1ce5588112cc751886bc124469f8f4af05195f062bce0cd8ab4b47eb51a0d30af16c
data/.gitignore ADDED
@@ -0,0 +1,65 @@
1
+ # files without extensions except directories
2
+ #*
3
+ #!/**/
4
+ #!?*.*
5
+
6
+ # directories (these will ignore .keep)
7
+ /.bundle/
8
+ /_yardoc/
9
+ /coverage/
10
+ /doc/
11
+ /pkg/
12
+ /spec/reports/
13
+ /vendor/
14
+ /node_modules/
15
+
16
+ # directory contents (these will not ignore .keep)
17
+ /cache/*
18
+ /tmp/*
19
+ /pid/*
20
+ /log/*
21
+ /public/*
22
+ /db/*
23
+
24
+ # files
25
+ *.dump
26
+ *.log
27
+ *.mod
28
+ *.o
29
+ *~
30
+ .*.swp
31
+ .DS_Store
32
+ .byebug
33
+ .idea
34
+ .project
35
+ .rake*
36
+ .rake*
37
+ .ruby-*
38
+ .rvmrc
39
+ .rubocop*
40
+ .secret
41
+ .yardoc
42
+ TODO.md
43
+ core.*
44
+ cscope.out
45
+ secrets.yml
46
+ .tags
47
+
48
+ # don't ignore
49
+ !.gitignore
50
+ !.keep
51
+ !Capfile
52
+ !Cheffile
53
+ !Gemfile
54
+ ![MR]akefile
55
+ !bin/**/[^.]*
56
+ !exe/**/[^.]*
57
+
58
+ /.bundle/
59
+ /.yardoc
60
+ /_yardoc/
61
+ /coverage/
62
+ /doc/
63
+ /pkg/
64
+ /spec/reports/
65
+ /tmp/
data/CHANGELOG ADDED
@@ -0,0 +1,5 @@
1
+ 0.1.1 Unreleased
2
+
3
+ 0.1.0 Mar 26 2020
4
+ - Initial release
5
+ - The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119
data/Gemfile ADDED
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in oak-api.gemspec
6
+ gemspec
7
+
8
+
9
+
10
+ gem "rubocop", "~> 1.7"
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 sergioro
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # Oak::Api
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/oak/api`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'oak-api'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle install
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install oak-api
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/oak-api.
36
+
37
+ ## License
38
+
39
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,15 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rake/testtask'
3
+ require 'rake/clean'
4
+
5
+ CLEAN.include ['**/.*.sw?', '**/*.gem', 'test/test.log']
6
+
7
+ task default: %i[test package]
8
+ task package: :clean
9
+
10
+ Rake::TestTask.new do |t|
11
+ t.libs << 'lib' << 'test'
12
+ t.test_files = FileList['test/**/*_test.rb']
13
+ t.warning = false
14
+ t.verbose = false
15
+ end
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "oak/api"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require "irb"
15
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/exe/oak ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $LOAD_PATH.unshift File.expand_path('../lib', __dir__)
4
+
5
+ require "oak_api"
6
+
7
+ Oak.greetings
data/lib/oak/api.rb ADDED
@@ -0,0 +1,6 @@
1
+ module Oak
2
+ module Api
3
+ class Error < StandardError; end
4
+ # Your code goes here...
5
+ end
6
+ end
@@ -0,0 +1,18 @@
1
+ require 'zlib'
2
+
3
+ module Oak
4
+ OakString = <<~tree
5
+ eJyNksFqxCAQhu8+hXhJC9E8QI/tykBbcujCUggYRNjeAj3nXfJEeaf+E+Ou
6
+ ruzSIWLi/834j1HIm3CtbpTCi0KMWhtRyFAz1rWt1kNOtM0uaM0Fgo3LzxnT
7
+ YRityEcoIZ0oa3AZ8ijlglXasC9R6ljiPTavMGqci8BT7TTFmNoZUTDqbh/X
8
+ eElOdgLTqBvyMOGcMbmVYZPRiwFAozaBrLo0guPjCpClJJIyZFoKFqEFWyks
9
+ EcXjcXejTpMzEW1ZOOnT4eO1/zxUzHAnb+b5unTsK+h/iZxLxbaPEuWQdcTf
10
+ p3Xpt+dtXb7WJfbfPapQNJffpmsEsL5aHWpjJtgwe/zU280SOl1AsoFm8scC
11
+ ngQcfPN5oK8W2wICRT8TDOASvf9O5zMI8QdEy6kN
12
+ tree
13
+ .delete("\s")
14
+
15
+ def self.greetings
16
+ puts Zlib::Inflate.inflate(OakString.unpack('m*')[0])
17
+ end
18
+ end
data/lib/oak/errors.rb ADDED
@@ -0,0 +1,5 @@
1
+ class Oak
2
+ class OakError < StandardError; end
3
+ class SomeWeirdError < OakError; end
4
+ end
5
+
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Oak
4
+ VERSION = "0.1.0"
5
+ end
data/lib/oak_api.rb ADDED
@@ -0,0 +1,47 @@
1
+ $LOAD_PATH.unshift __dir__
2
+
3
+ # stdlib
4
+ require 'optparse'
5
+
6
+ # internal
7
+ require 'oak/api'
8
+ require 'oak/version'
9
+ require 'oak/easter_egg'
10
+
11
+ module Oak
12
+ def self.run(args)
13
+ options = Options.parse(args)
14
+ end
15
+
16
+ class Options
17
+ def self.parse(args)
18
+ options = {}
19
+
20
+ OptionParser.new do |opts|
21
+ opts.program_name = File.basename(bash)
22
+ opts.banner = "Usage: #{opts.program_name} [options]"
23
+
24
+ opts.separator = ""
25
+ opts.separator = "Options:"
26
+
27
+ opts.on("-oNAME", "--output=NAME", "Specify output file name") do |v|
28
+ options[:output] = v
29
+ end
30
+
31
+ opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
32
+ options[:verbose] = v
33
+ end
34
+
35
+ opts.on_tail("-h", "--help", "Print help", "something else") do |v|
36
+ abort opts.to_s
37
+ end
38
+
39
+ opts.on_tail("-V", "--version", "Print version") do |v|
40
+ abort "#{opts.program_name} #{VERSION}"
41
+ end
42
+ end.parse!(args)
43
+
44
+ options
45
+ end
46
+ end
47
+ end
data/oak-api.gemspec ADDED
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/oak/version"
4
+ require_relative "lib/oak/easter_egg"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "oak-api"
8
+ spec.version = Oak::VERSION
9
+ spec.authors = ["Oak Software"]
10
+ spec.post_install_message = Oak.greetings
11
+ #spec.email = ["TOOD add email once the first working version of the API is ready"]
12
+
13
+ spec.summary = "Tool to interact with Oak API"
14
+ spec.description = "Get access to posts, tasks, and site analysitcs"
15
+ #spec.homepage = "TOOD add API docs URL docsonce the first working version of the API is ready"
16
+ spec.license = "MIT"
17
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
18
+
19
+ # Specify which files should be added to the gem when it is released.
20
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
21
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
22
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
23
+ end
24
+ spec.bindir = "exe"
25
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
26
+ spec.require_paths = ["lib"]
27
+
28
+ # Uncomment to register a new dependency of your gem
29
+ # spec.add_dependency "example-gem", "~> 1.0"
30
+
31
+ # For more information and examples about making a new gem, checkout our
32
+ # guide at: https://bundler.io/guides/creating_gem.html
33
+
34
+ #spec.add_development_dependency "benchmark-ips", ">= 0"
35
+ spec.add_development_dependency "byebug", "~> 11.0.1"
36
+ spec.add_development_dependency "minitest", "~> 5.0"
37
+ spec.add_development_dependency "minitest-sprint"
38
+ spec.add_development_dependency "minitest-reporters"
39
+ spec.add_development_dependency "minitest-english"
40
+ spec.add_development_dependency "minitest-hooks"
41
+ spec.add_development_dependency "minitest-fail-fast"
42
+ spec.add_development_dependency "minitest-global_expectations"
43
+ spec.add_development_dependency "rake"
44
+ spec.add_development_dependency "ronn"
45
+ spec.add_development_dependency "ruby-prof"
46
+
47
+ #spec.add_runtime_dependency "SOME_GEM", "~> VERSION"
48
+ end
metadata ADDED
@@ -0,0 +1,213 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: oak-api
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Oak Software
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2021-03-26 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: byebug
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 11.0.1
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 11.0.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: minitest
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '5.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '5.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest-sprint
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: minitest-reporters
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: minitest-english
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: minitest-hooks
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: minitest-fail-fast
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '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'
111
+ - !ruby/object:Gem::Dependency
112
+ name: minitest-global_expectations
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rake
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: ronn
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: ruby-prof
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ description: Get access to posts, tasks, and site analysitcs
168
+ email:
169
+ executables:
170
+ - oak
171
+ extensions: []
172
+ extra_rdoc_files: []
173
+ files:
174
+ - ".gitignore"
175
+ - ".rubocop.yml"
176
+ - CHANGELOG
177
+ - Gemfile
178
+ - LICENSE.txt
179
+ - README.md
180
+ - Rakefile
181
+ - bin/console
182
+ - bin/setup
183
+ - exe/oak
184
+ - lib/oak/api.rb
185
+ - lib/oak/easter_egg.rb
186
+ - lib/oak/errors.rb
187
+ - lib/oak/version.rb
188
+ - lib/oak_api.rb
189
+ - oak-api.gemspec
190
+ homepage:
191
+ licenses:
192
+ - MIT
193
+ metadata: {}
194
+ post_install_message:
195
+ rdoc_options: []
196
+ require_paths:
197
+ - lib
198
+ required_ruby_version: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - ">="
201
+ - !ruby/object:Gem::Version
202
+ version: 2.4.0
203
+ required_rubygems_version: !ruby/object:Gem::Requirement
204
+ requirements:
205
+ - - ">="
206
+ - !ruby/object:Gem::Version
207
+ version: '0'
208
+ requirements: []
209
+ rubygems_version: 3.2.11
210
+ signing_key:
211
+ specification_version: 4
212
+ summary: Tool to interact with Oak API
213
+ test_files: []