difio-cloudcontrol-ruby 1.0.1
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.
- data/.gitignore +6 -0
- data/Gemfile +3 -0
- data/LICENSE +19 -0
- data/README.md +48 -0
- data/Rakefile +1 -0
- data/bin/difio-cctrl +5 -0
- data/difio-cloudcontrol-ruby.gemspec +25 -0
- data/lib/difio-cloudcontrol-ruby/version.rb +5 -0
- data/lib/difio-cloudcontrol-ruby.rb +19 -0
- metadata +89 -0
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (c) 2012, Alexander Todorov <atodorov [AT] dif.io>
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
Registration agent for Difio, for cloudControl / Ruby applications.
|
2
|
+
|
3
|
+
It compiles a list of installed packages and sends it to http://www.dif.io.
|
4
|
+
|
5
|
+
Installing inside your cloudControl application
|
6
|
+
-----------------------------------------------
|
7
|
+
|
8
|
+
- Create an account at http://www.dif.io
|
9
|
+
|
10
|
+
- Create your Ruby application in cloudControl
|
11
|
+
|
12
|
+
- Add a dependency in your application's Gemfile
|
13
|
+
|
14
|
+
...
|
15
|
+
gem 'difio-cloudcontrol-ruby'
|
16
|
+
...
|
17
|
+
|
18
|
+
- Update your `Gemfile.lock` by running locally
|
19
|
+
|
20
|
+
bundle install
|
21
|
+
|
22
|
+
- Then commit, push and deploy your application to cloudControl
|
23
|
+
|
24
|
+
git commit -a -m "added dependency on Difio"
|
25
|
+
cctrlapp APP_NAME push
|
26
|
+
cctrlapp APP_NAME deploy
|
27
|
+
|
28
|
+
- Configure your user credentials
|
29
|
+
|
30
|
+
cctrlapp APP_NAME/DEP_NAME addon.add config.free --DIFIO_USER_ID=YourUserID
|
31
|
+
|
32
|
+
- Execute the registration script to submit the information to Difio
|
33
|
+
|
34
|
+
cctrlapp APP_NAME/DEP_NAME run /app/bin/difio-cctrl
|
35
|
+
Running `/app/bin/difio-cctrl` attached to terminal... up, run.1
|
36
|
+
Success, registered/updated application 8370e3be-6e54-462d-9ca9-224301c29a1d
|
37
|
+
|
38
|
+
|
39
|
+
That's it, you can now check your application statistics at http://www.dif.io
|
40
|
+
|
41
|
+
|
42
|
+
Updating dependencies
|
43
|
+
----------------------
|
44
|
+
|
45
|
+
Whenever you change your application to include new dependencies or
|
46
|
+
upgrade/downgrade package versions you should re-submit the information to Difio.
|
47
|
+
|
48
|
+
cctrlapp APP_NAME/DEP_NAME run /app/bin/difio-cctrl
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/difio-cctrl
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "difio-cloudcontrol-ruby/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "difio-cloudcontrol-ruby"
|
7
|
+
s.version = Difio::CloudControl::VERSION
|
8
|
+
s.authors = ["Alexander Todorov"]
|
9
|
+
s.email = ["atodorov@dif.io"]
|
10
|
+
s.homepage = "https://github.com/difio/difio-cloudcontrol-ruby"
|
11
|
+
s.summary = %q{Difio registration agent for cloudControl / Ruby applications}
|
12
|
+
s.description = %q{Difio registration agent for cloudControl / Ruby applications. See the README for usage.}
|
13
|
+
|
14
|
+
s.rubyforge_project = "difio-cloudcontrol-ruby"
|
15
|
+
|
16
|
+
s.files = `git ls-files`.split("\n")
|
17
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
|
+
s.require_paths = ["lib"]
|
20
|
+
|
21
|
+
# specify any dependencies here; for example:
|
22
|
+
# s.add_development_dependency "rspec"
|
23
|
+
s.add_runtime_dependency "common-ruby-difio"
|
24
|
+
s.add_runtime_dependency "json"
|
25
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require "common-ruby-difio"
|
2
|
+
require "json"
|
3
|
+
|
4
|
+
module Difio
|
5
|
+
class CloudControl < Difio::DifioBase
|
6
|
+
json = File.read('/srv/creds/creds.json')
|
7
|
+
creds = JSON.parse(json)
|
8
|
+
|
9
|
+
configure({
|
10
|
+
'user_id' => creds['CONFIG']['CONFIG_VARS']['DIFIO_USER_ID'],
|
11
|
+
'app_name' => ENV['DEP_NAME'],
|
12
|
+
'app_uuid' => ENV['DEP_ID'],
|
13
|
+
'app_type' => 'ruby-' + RUBY_VERSION,
|
14
|
+
'app_url' => 'http://' + ENV['DEP_NAME'].split('/')[0] + '.' + ENV['DOMAIN'],
|
15
|
+
'app_vendor' => 3, # cloudControl
|
16
|
+
'url' => ENV['DIFIO_REGISTER_URL'],
|
17
|
+
})
|
18
|
+
end
|
19
|
+
end
|
metadata
ADDED
@@ -0,0 +1,89 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: difio-cloudcontrol-ruby
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Alexander Todorov
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-11-01 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: common-ruby-difio
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: json
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
description: Difio registration agent for cloudControl / Ruby applications. See the
|
47
|
+
README for usage.
|
48
|
+
email:
|
49
|
+
- atodorov@dif.io
|
50
|
+
executables:
|
51
|
+
- difio-cctrl
|
52
|
+
extensions: []
|
53
|
+
extra_rdoc_files: []
|
54
|
+
files:
|
55
|
+
- .gitignore
|
56
|
+
- Gemfile
|
57
|
+
- LICENSE
|
58
|
+
- README.md
|
59
|
+
- Rakefile
|
60
|
+
- bin/difio-cctrl
|
61
|
+
- difio-cloudcontrol-ruby.gemspec
|
62
|
+
- lib/difio-cloudcontrol-ruby.rb
|
63
|
+
- lib/difio-cloudcontrol-ruby/version.rb
|
64
|
+
homepage: https://github.com/difio/difio-cloudcontrol-ruby
|
65
|
+
licenses: []
|
66
|
+
post_install_message:
|
67
|
+
rdoc_options: []
|
68
|
+
require_paths:
|
69
|
+
- lib
|
70
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
71
|
+
none: false
|
72
|
+
requirements:
|
73
|
+
- - ! '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
|
+
none: false
|
78
|
+
requirements:
|
79
|
+
- - ! '>='
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
requirements: []
|
83
|
+
rubyforge_project: difio-cloudcontrol-ruby
|
84
|
+
rubygems_version: 1.8.24
|
85
|
+
signing_key:
|
86
|
+
specification_version: 3
|
87
|
+
summary: Difio registration agent for cloudControl / Ruby applications
|
88
|
+
test_files: []
|
89
|
+
has_rdoc:
|