diglossa 0.2.22 → 0.2.23

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/lib/diglossa/cli.rb CHANGED
@@ -20,6 +20,10 @@ module Diglossa
20
20
  :banner => "set the application directory to work with. assumes the current directory"
21
21
 
22
22
 
23
+ method_option "appname",
24
+ :type => :string,
25
+ :banner => "set the name of the application for templating. defaults to the basename of the appdir"
26
+
23
27
  default_task :help
24
28
 
25
29
 
@@ -86,11 +90,6 @@ module Diglossa
86
90
  super
87
91
  self.appdir = options[:appdir] || File.expand_path(Dir.pwd)
88
92
  # self.config_file = options[:config]
89
- # self.debug = options[:debug]
90
- # if debug
91
- # Soca.debug = true
92
- # logger.level = Logger::DEBUG
93
- # end
94
93
  self.source_paths << File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
95
94
  end
96
95
 
@@ -112,17 +111,21 @@ module Diglossa
112
111
 
113
112
  # end
114
113
 
115
- desc 'generate [APPDIR]', 'generates the basic soca app structure'
114
+ desc 'generate [APPDIR]', 'generates .couchapprc'
116
115
  def generate(to = nil)
117
116
  self.appdir = to if to
118
117
  self.destination_root = appdir
119
-
120
- directory('hooks')
118
+ directory('blog')
119
+ directory('authors')
121
120
  template('couchapprc.erb', '.couchapprc')
122
121
  end
123
122
 
124
123
  private
125
124
 
125
+ def appname
126
+ @appname = options[:name] || File.basename(appdir)
127
+ end
128
+
126
129
  def remote(env)
127
130
  Diglossa::Remote.new appdir, env #, config_file
128
131
  rescue => e
@@ -0,0 +1,7 @@
1
+ {
2
+ "type": "author",
3
+ "lang": "ru",
4
+ "en": "V.V. Malyavin",
5
+ "ru": "Вл.Вяч. Малявин",
6
+ "nic": "malyavin"
7
+ }
File without changes
@@ -0,0 +1,10 @@
1
+ {
2
+ "env": {
3
+ "default": {
4
+ "db": "http://admin:admin@localhost:5984/<%= appname %>"
5
+ },
6
+ "production": {
7
+ "db": "http://admin:admin@localhost:5984/<%= appname %>"
8
+ }
9
+ }
10
+ }
@@ -1,4 +1,4 @@
1
1
  module Diglossa
2
- VERSION = "0.2.22"
2
+ VERSION = "0.2.23"
3
3
  Lib = "~/web/diglossa.data"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: diglossa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.22
4
+ version: 0.2.23
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -191,6 +191,9 @@ files:
191
191
  - lib/diglossa/cli.rb
192
192
  - lib/diglossa/parse.rb
193
193
  - lib/diglossa/remote.rb
194
+ - lib/diglossa/templates/authors/author.json
195
+ - lib/diglossa/templates/blog/04-02-2013-blog
196
+ - lib/diglossa/templates/couchapprc.erb
194
197
  - lib/diglossa/version.rb
195
198
  - spec/spec_helper.rb
196
199
  homepage: ''