Skip to content

Commit 304f039

Browse files
committed
initial commit
0 parents  commit 304f039

File tree

397 files changed

+15648
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

397 files changed

+15648
-0
lines changed

.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
*.gem
2+
*.rbc
3+
.bundle
4+
.config
5+
.yardoc
6+
Gemfile.lock
7+
InstalledFiles
8+
_yardoc
9+
coverage
10+
doc/
11+
lib/bundler/man
12+
pkg
13+
rdoc
14+
spec/reports
15+
test/tmp
16+
test/version_tmp
17+
tmp
18+
.core
19+
.token
20+
*.swp
21+
.rspec
22+
.gemrelease
23+
tags

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.1.5

.travis.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
notifications:
3+
email: false
4+
webhooks:
5+
- https://ensemble.engineyard.com/travis
6+
7+
addons:
8+
code_climate:
9+
repo_token:
10+
secure: "SCFPa7xtyR6UOrfh3YIv7kvfhGy9vkQ9469HARUoCYmfQUY87I1zdehfCKh/pm8bwGOpQbsxwmxe9a5QrH5xXZdndbm1Ry0vhfYEXaiVfE4qZrq1TbrWbYxG5lPuXs04FGtLP0Xqm8wGnfS95PmG2KA8OjrT+vn1MCXbYPICvK4="
11+
12+
language: ruby
13+
cache: bundler
14+
15+
rvm:
16+
- 1.9.3
17+
- 2.1.5
18+
19+
env:
20+
- COVERAGE=true
21+
22+
script: bundle exec rake

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
== 0.5.3
2+
* fix mock mode interaction with addon attachments
3+
[#80](https://github.com/engineyard/core/pull/80)
4+
* remove read channel attribute
5+
[#78](https://github.com/engineyard/core/pull/78)
6+
7+
== 0.4.27
8+
* add managing ssl certificates
9+
10+
== 0.3.19
11+
12+
* add creating and destroying firewalls and firewall rules
13+
* add creating and getting logs

Gemfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
source 'https://rubygems.org'
2+
3+
# Specify your gem's dependencies in ey-core.gemspec
4+
gemspec
5+
6+
gem 'awesome_print', '~> 1.0'
7+
gem 'faye', '~> 1.1'
8+
gem 'oj'
9+
gem 'oj_mimic_json'
10+
gem 'pry-nav'
11+
12+
group :doc do
13+
gem 'yard'
14+
gem 'redcarpet'
15+
end
16+
17+
group :test do
18+
gem 'codeclimate-test-reporter', '~> 0.3'
19+
gem 'faker'
20+
gem 'guard-bundler', require: false
21+
gem 'guard-rspec', '~> 4.2', require: false
22+
gem 'hashie'
23+
gem 'rack-test'
24+
gem 'rake'
25+
gem 'rspec', '~> 3.1'
26+
gem 'simplecov'
27+
gem 'timecop'
28+
end

Guardfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# A sample Guardfile
2+
# More info at https://github.com/guard/guard#readme
3+
4+
5+
guard 'bundler' do
6+
watch('Gemfile')
7+
watch(/^.+\.gemspec/)
8+
end
9+
10+
guard 'rspec', cmd: "bundle exec rspec", all_on_start: true, failed_mode: :focus do
11+
watch(%r{^spec/.+_spec\.rb$})
12+
watch(%r{^lib/(.+)\.rb$}) { "spec" }
13+
watch('spec/spec_helper.rb') { "spec" }
14+
watch(%r{^spec/(support|shared).*\.rb$}) { "spec" }
15+
end

LICENSE.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright (c) 2012 Josh Lane
2+
3+
MIT License
4+
5+
Permission is hereby granted, free of charge, to any person obtaining
6+
a copy of this software and associated documentation files (the
7+
"Software"), to deal in the Software without restriction, including
8+
without limitation the rights to use, copy, modify, merge, publish,
9+
distribute, sublicense, and/or sell copies of the Software, and to
10+
permit persons to whom the Software is furnished to do so, subject to
11+
the following conditions:
12+
13+
The above copyright notice and this permission notice shall be
14+
included in all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Ey::Core
2+
3+
Official Ruby Engine Yard Core API Client.
4+
5+
## Installation
6+
7+
Add this line to your application's Gemfile:
8+
9+
gem 'ey-core'
10+
11+
And then execute:
12+
13+
$ bundle
14+
15+
Or install it yourself as:
16+
17+
$ gem install ey-core
18+
19+
## Usage
20+
21+
Uses [cistern](https://github.com/lanej/cistern) to wrap RESTful resources nicely. See [rdoc](https://docbox.engineyard.com/core/branch/master/index.html).
22+
23+
```ruby
24+
client.users.current # =>
25+
<Ey::Core::Client::User
26+
id="0037000000uLmCe",
27+
name="Josh Lane",
28+
29+
accounts_url="https://api.engineyard.com/users/0037000000uLmCe/accounts"
30+
>
31+
```
32+
33+
### Authentication
34+
35+
* Via Token
36+
37+
```ruby
38+
Ey::Core::Client.new(token: "943662ea7d0fad349eeae9f69adb521d")
39+
```
40+
41+
* Via HMAC
42+
43+
```ruby
44+
Ey::Core::Client.new(
45+
:auth_id => "943662ea7d0fad",
46+
:auth_key => "943662ea7d0fad349eeae9f69adb521d",
47+
:logger => Logger.new(STDOUT),
48+
)
49+
```
50+
51+
### Mock
52+
53+
Mock is disabled by default.
54+
55+
```ruby
56+
Ey::Core::Client.mocking? # => false
57+
Ey::Core::Client.mock!
58+
Ey::Core::Client.mocking? # => true
59+
```
60+
61+
Reset the mock
62+
63+
```ruby
64+
Ey::Core::Client.reset!
65+
```
66+
67+
### Testing
68+
69+
By default, specs are run against the core mock. In order to run them against awsm mocked mode instead, run `MOCK_CORE=false bundle exec rspec`
70+
71+
## Releasing
72+
73+
$ gem install gem-release
74+
$ gem bump -trv (major|minor|patch)
75+
76+
## Contributing
77+
78+
1. Fork it
79+
2. Create your feature branch (`git checkout -b my-new-feature`)
80+
3. Commit your changes (`git commit -am 'Add some feature'`)
81+
4. Push to the branch (`git push origin my-new-feature`)
82+
5. Create new Pull Request

Rakefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env rake
2+
require "bundler/gem_tasks"
3+
4+
namespace :spec do
5+
task :mocked do
6+
sh "env MOCK_CORE=true bundle exec rspec spec/"
7+
end
8+
task :unmocked do
9+
sh "env MOCK_CORE=false CORE_URL=http://api-development.localdev.engineyard.com:9292 bundle exec rspec spec/"
10+
end
11+
end
12+
13+
task :spec => ["spec:mocked", "spec:unmocked"]
14+
15+
task default: "spec:mocked"

TODO.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* remove "search" functionality and pipe through index requests with parameters

0 commit comments

Comments
 (0)