yeastymobs-machinist_mongomapper 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ .DS_Store
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 Yeasty Mobs
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,5 @@
1
+ Machinist adapter for [MongoMapper](http://github.com/jnunemaker/mongomapper).
2
+
3
+ ## TODO
4
+
5
+ * Add associations support.
data/Rakefile ADDED
@@ -0,0 +1,18 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "machinist_mongomapper"
8
+ gem.summary = %Q{Machinist adapter for MongoMapper}
9
+ gem.email = "dev@yeastymobs.com"
10
+ gem.homepage = "http://github.com/yeastymobs/machinist_mongomapper"
11
+ gem.authors = ["Nicolas Mérouze", "Vincent Hellot", "Mathieu Fosse"]
12
+
13
+ gem.add_dependency('notahat-machinist', '~> 1.0.3')
14
+ gem.add_dependency('mongomapper', '~> 0.3.1')
15
+ end
16
+ rescue LoadError
17
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
18
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.9.1
data/init.rb ADDED
@@ -0,0 +1 @@
1
+ require 'machinist/mongomapper' if Rails.env =~ /^test|cucumber$/
@@ -0,0 +1,30 @@
1
+ require 'machinist'
2
+ require 'machinist/blueprints'
3
+
4
+ module Machinist
5
+
6
+ class MongoMapperAdapter
7
+ end
8
+
9
+ module MongoMapperExtensions
10
+ def make(*args, &block)
11
+ lathe = Lathe.run(Machinist::MongoMapperAdapter, self.new, *args)
12
+ lathe.object.save! unless Machinist.nerfed?
13
+ lathe.object(&block)
14
+ end
15
+
16
+ def make_unsaved(*args)
17
+ returning(Machinist.with_save_nerfed { make(*args) }) do |object|
18
+ yield object if block_given?
19
+ end
20
+ end
21
+
22
+ def plan(*args)
23
+ Lathe.run(Machinist::MongoMapperAdapter, self.new, *args)
24
+ end
25
+ end
26
+
27
+ end
28
+
29
+ MongoMapper::Document::ClassMethods.send(:include, Machinist::Blueprints::ClassMethods)
30
+ MongoMapper::Document::ClassMethods.send(:include, Machinist::MongoMapperExtensions)
@@ -0,0 +1,46 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{machinist_mongomapper}
5
+ s.version = "0.9.1"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Nicolas M\303\251rouze", "Vincent Hellot", "Mathieu Fosse"]
9
+ s.date = %q{2009-07-29}
10
+ s.email = %q{dev@yeastymobs.com}
11
+ s.extra_rdoc_files = [
12
+ "LICENSE",
13
+ "README.md"
14
+ ]
15
+ s.files = [
16
+ ".gitignore",
17
+ "LICENSE",
18
+ "README.md",
19
+ "Rakefile",
20
+ "VERSION",
21
+ "init.rb",
22
+ "lib/machinist/mongomapper.rb",
23
+ "machinist_mongomapper.gemspec"
24
+ ]
25
+ s.homepage = %q{http://github.com/yeastymobs/machinist_mongomapper}
26
+ s.rdoc_options = ["--charset=UTF-8"]
27
+ s.require_paths = ["lib"]
28
+ s.rubygems_version = %q{1.3.5}
29
+ s.summary = %q{Machinist adapter for MongoMapper}
30
+
31
+ if s.respond_to? :specification_version then
32
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
33
+ s.specification_version = 3
34
+
35
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
36
+ s.add_runtime_dependency(%q<notahat-machinist>, ["~> 1.0.3"])
37
+ s.add_runtime_dependency(%q<mongomapper>, ["~> 0.3.1"])
38
+ else
39
+ s.add_dependency(%q<notahat-machinist>, ["~> 1.0.3"])
40
+ s.add_dependency(%q<mongomapper>, ["~> 0.3.1"])
41
+ end
42
+ else
43
+ s.add_dependency(%q<notahat-machinist>, ["~> 1.0.3"])
44
+ s.add_dependency(%q<mongomapper>, ["~> 0.3.1"])
45
+ end
46
+ end
metadata ADDED
@@ -0,0 +1,83 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: yeastymobs-machinist_mongomapper
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.9.1
5
+ platform: ruby
6
+ authors:
7
+ - "Nicolas M\xC3\xA9rouze"
8
+ - Vincent Hellot
9
+ - Mathieu Fosse
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+
14
+ date: 2009-07-29 00:00:00 -07:00
15
+ default_executable:
16
+ dependencies:
17
+ - !ruby/object:Gem::Dependency
18
+ name: notahat-machinist
19
+ type: :runtime
20
+ version_requirement:
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ~>
24
+ - !ruby/object:Gem::Version
25
+ version: 1.0.3
26
+ version:
27
+ - !ruby/object:Gem::Dependency
28
+ name: mongomapper
29
+ type: :runtime
30
+ version_requirement:
31
+ version_requirements: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - ~>
34
+ - !ruby/object:Gem::Version
35
+ version: 0.3.1
36
+ version:
37
+ description:
38
+ email: dev@yeastymobs.com
39
+ executables: []
40
+
41
+ extensions: []
42
+
43
+ extra_rdoc_files:
44
+ - LICENSE
45
+ - README.md
46
+ files:
47
+ - .gitignore
48
+ - LICENSE
49
+ - README.md
50
+ - Rakefile
51
+ - VERSION
52
+ - init.rb
53
+ - lib/machinist/mongomapper.rb
54
+ - machinist_mongomapper.gemspec
55
+ has_rdoc: false
56
+ homepage: http://github.com/yeastymobs/machinist_mongomapper
57
+ licenses:
58
+ post_install_message:
59
+ rdoc_options:
60
+ - --charset=UTF-8
61
+ require_paths:
62
+ - lib
63
+ required_ruby_version: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: "0"
68
+ version:
69
+ required_rubygems_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: "0"
74
+ version:
75
+ requirements: []
76
+
77
+ rubyforge_project:
78
+ rubygems_version: 1.3.5
79
+ signing_key:
80
+ specification_version: 3
81
+ summary: Machinist adapter for MongoMapper
82
+ test_files: []
83
+