namelessjon-dm-gen 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.rdoc ADDED
@@ -0,0 +1,28 @@
1
+ === 0.2.2 / 2009-01-21
2
+
3
+ * Now using a constant for the DataMapper version supported.
4
+ * Added this changelog
5
+
6
+ === 0.2.1 / 2009-01-21
7
+
8
+ * Minor correction to the is plugin manifest
9
+
10
+ === 0.2.0 / 2009-01-21
11
+
12
+ * Added generator for DataMapper adapters
13
+
14
+ === 0.1.0 / 2009-01-20
15
+
16
+ * Added generator for DataMapper is plugins
17
+
18
+ === 0.0.4 / 2008-12-13
19
+
20
+ * check for .rb extension on the given filename, and ignore it
21
+ * improved documentation for generator
22
+ * filter out serial from the given properties list
23
+ * added a whole bunch of specs!
24
+ * Other, minor, output tweaks
25
+
26
+ === 0.0.3 / 2008-12-01
27
+
28
+ * First working release!
data/README.rdoc ADDED
@@ -0,0 +1,45 @@
1
+ = dm-gen
2
+
3
+
4
+ dm-gen is a collection of generators for DataMapper, to allieviate the need to
5
+ type boilerplate code to get started on a project. dm-gen uses
6
+ templater[http://github.com/jnicklas/templater] as a base.
7
+
8
+ == The Generators
9
+
10
+ === one_file
11
+
12
+
13
+ The one file generator generates a single file, which sets up a connection to an
14
+ in memory sqlite3 database, along with debug logging and a example model, which
15
+ it then automigrates. One file scripts are great to use as demonstration,
16
+ either of a bug, or just how to do something.
17
+
18
+ dm-gen one_file validations_example
19
+
20
+
21
+ === is
22
+
23
+
24
+ The is generator generates an 'is' plugin structure, appropriate for plugins
25
+ such as dm-is-list, dm-is-remixable etc. A complete plugin structure is
26
+ generated, including a Rakefile and spec suite skeleton.
27
+
28
+ dm-gen is example
29
+
30
+
31
+ === adapter
32
+
33
+
34
+ The adapter generator generates an adapter structure, appropriate for adapters
35
+ to new data-sources, such as couchdb, YAML files, or anything else. A complete
36
+ plugin structure is generated. The adapter file generated comes with a lot of
37
+ documentation explaining the arguments and returns of the 4 methods in the DM
38
+ adaptor API.
39
+
40
+ dm-gen adapter example
41
+
42
+
43
+ == COPYRIGHT
44
+
45
+ Copyright (c) 2008-2009 Jonathan Stott. See LICENSE for details.
data/lib/dm_gen.rb CHANGED
@@ -11,6 +11,8 @@ require 'templater'
11
11
  module DMGen
12
12
  extend Templater::Manifold
13
13
 
14
+ DM_VERSION = '0.9.10'
15
+
14
16
  desc <<-eos
15
17
  Generates files for the DataMapper ORM.
16
18
  eos
@@ -1,4 +1,4 @@
1
- gem 'dm-core', '~>0.9.10'
1
+ gem 'dm-core', '~> <%= DMGen::DM_VERSION %>'
2
2
  require 'dm-core'
3
3
 
4
4
  module DataMapper
@@ -3,7 +3,7 @@ require 'rubygems'
3
3
  require 'pathname'
4
4
 
5
5
  # Add all external dependencies for the plugin here
6
- gem 'dm-core', '~>0.9.10'
6
+ gem 'dm-core', '~> <%= DMGen::DM_VERSION %>'
7
7
  require 'dm-core'
8
8
 
9
9
  # Require plugin-files
@@ -3,7 +3,7 @@
3
3
  # A one file test to show ...
4
4
  require 'rubygems'
5
5
 
6
- gem('dm-core', '~> 0.9.8')
6
+ gem('dm-core', '~> <%= DMGen::DM_VERSION %>')
7
7
  require 'dm-core'
8
8
 
9
9
 
@@ -35,6 +35,7 @@ shared "one file generator" do
35
35
 
36
36
  it "requires dm-core" do
37
37
  @result.should.match(/require 'dm-core'/)
38
+ @result.should.match(/gem\('dm-core', '~> 0.9.10'\)/)
38
39
  end
39
40
 
40
41
  # other boilerplate
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: namelessjon-dm-gen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Stott
@@ -30,17 +30,18 @@ extensions: []
30
30
  extra_rdoc_files: []
31
31
 
32
32
  files:
33
+ - CHANGELOG.rdoc
34
+ - README.rdoc
33
35
  - bin/dm-gen
34
36
  - lib/templates
35
- - lib/templates/one_file.rb
36
37
  - lib/templates/is
37
38
  - lib/templates/is/lib
38
39
  - lib/templates/is/lib/dm-is-example
39
- - lib/templates/is/lib/%gem_name%.rb
40
40
  - lib/templates/is/lib/%gem_name%
41
41
  - lib/templates/is/lib/%gem_name%/is
42
42
  - lib/templates/is/lib/%gem_name%/is/%snake_name%.rb
43
43
  - lib/templates/is/lib/%gem_name%/is/version.rb
44
+ - lib/templates/is/lib/%gem_name%.rb
44
45
  - lib/templates/is/History.txt
45
46
  - lib/templates/is/LICENSE
46
47
  - lib/templates/is/README.txt
@@ -63,9 +64,9 @@ files:
63
64
  - lib/templates/adapter/Rakefile
64
65
  - lib/templates/adapter/TODO
65
66
  - lib/templates/adapter/lib
66
- - lib/templates/adapter/lib/%adapter_file%.rb
67
67
  - lib/templates/adapter/lib/%adapter_file%
68
68
  - lib/templates/adapter/lib/%adapter_file%/version.rb
69
+ - lib/templates/adapter/lib/%adapter_file%.rb
69
70
  - lib/templates/adapter/spec
70
71
  - lib/templates/adapter/spec/integration
71
72
  - lib/templates/adapter/spec/integration/%adapter_file%_spec.rb
@@ -74,6 +75,7 @@ files:
74
75
  - lib/templates/adapter/tasks
75
76
  - lib/templates/adapter/tasks/install.rb
76
77
  - lib/templates/adapter/tasks/spec.rb
78
+ - lib/templates/one_file.rb
77
79
  - lib/generators
78
80
  - lib/generators/one_file.rb
79
81
  - lib/generators/adapter.rb