dotcloud 0.0.0 → 0.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.
Files changed (7) hide show
  1. data/README +0 -0
  2. data/Rakefile +1 -1
  3. data/TODO +1 -0
  4. data/VERSION +1 -1
  5. data/lib/dotcloud.rb +1 -0
  6. data/lib/dotcloud/dsl.rb +38 -0
  7. metadata +11 -7
data/README ADDED
File without changes
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ begin
5
5
  s.executables = ""
6
6
  s.summary = "Ruby DotCloud post install push hook helpers"
7
7
  s.email = "nitayj@gmail.com"
8
- s.homepage = "http://github.com/nitay/dotcloud-hooks"
8
+ s.homepage = "http://github.com/nitay/dotcloud"
9
9
  s.description = "Ruby DotCloud post install push hook helpers"
10
10
  s.authors = ["Nitay Joffe"]
11
11
  s.files = FileList["[A-Z]*",
data/TODO ADDED
@@ -0,0 +1 @@
1
+ - Add tests
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.0
1
+ 0.0.1
data/lib/dotcloud.rb CHANGED
@@ -8,3 +8,4 @@ require 'active_support'
8
8
  # our files
9
9
  $LOAD_PATH.unshift File.dirname(__FILE__)
10
10
  require 'dotcloud/host'
11
+ require 'dotcloud/dsl'
@@ -0,0 +1,38 @@
1
+ module DotCloud
2
+ class Namespace
3
+ def initialize
4
+ @services = {}
5
+ end
6
+
7
+ def service(name, &block)
8
+ @services[name.to_s] = block
9
+ end
10
+ end
11
+
12
+ class DSL
13
+ include Singleton
14
+
15
+ def initialize
16
+ @current_namespace = nil
17
+ @namespaces = {}
18
+ end
19
+
20
+ def namespace(name, &block)
21
+ @current_namespace = Namespace.new
22
+ @namespaces[name.to_s] = @current_namespace
23
+ end
24
+
25
+ def service(name, &block)
26
+ @current_namespace.service(name, &block)
27
+ end
28
+ end
29
+ end
30
+
31
+ def namespace(name, &block)
32
+ DSL.instance.namespace(name, &block)
33
+ end
34
+ alias_method :application, :namespace
35
+
36
+ def service(name, &block)
37
+ DSL.instance.service(name, &block)
38
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dotcloud
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 0
10
- version: 0.0.0
9
+ - 1
10
+ version: 0.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Nitay Joffe
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-12 00:00:00 -07:00
18
+ date: 2011-07-13 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -72,17 +72,21 @@ executables: []
72
72
 
73
73
  extensions: []
74
74
 
75
- extra_rdoc_files: []
76
-
75
+ extra_rdoc_files:
76
+ - README
77
+ - TODO
77
78
  files:
78
79
  - Gemfile
79
80
  - Gemfile.lock
81
+ - README
80
82
  - Rakefile
83
+ - TODO
81
84
  - VERSION
82
85
  - lib/dotcloud.rb
86
+ - lib/dotcloud/dsl.rb
83
87
  - lib/dotcloud/host.rb
84
88
  has_rdoc: true
85
- homepage: http://github.com/nitay/dotcloud-hooks
89
+ homepage: http://github.com/nitay/dotcloud
86
90
  licenses: []
87
91
 
88
92
  post_install_message: