angus 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,7 @@
1
1
  require 'erb'
2
2
  require 'thor'
3
3
  require 'thor/runner'
4
+ require 'angus'
4
5
 
5
6
  require_relative 'command_processor'
6
7
 
@@ -1,11 +1,11 @@
1
1
  class <%= classify(resource_name) %> < Angus::BaseResource
2
- <% unless actions.nil? %>
2
+ <% unless actions.nil? -%>
3
3
  <% actions.each do |action_name| %>
4
- def
5
-
6
- {users: [{id: 1, name: 'User one'}, {id: 2, name: 'User two'}]}
7
- <% end %>
8
- end
9
- <% end %>
4
+ def <%= action_name %>
5
+ <% if is_demo? -%>
6
+ { users: [{ id: 1, name: 'User one' }, { id: 2, name: 'User two' }] }
7
+ <% end -%>
8
+ end
10
9
  <% end %>
10
+ <% end -%>
11
11
  end
@@ -16,7 +16,7 @@ module Angus
16
16
  tmp_file = Tempfile.new(File.basename(file))
17
17
 
18
18
  source = File.expand_path(base.find_in_source_paths(file.to_s))
19
- content = ERB.new(File.binread(source)).result(binding)
19
+ content = ERB.new(File.binread(source), nil, '%<>-').result(binding)
20
20
 
21
21
  File.open(tmp_file.path, 'w') { |f| f << content }
22
22
  tmp_file.close
@@ -64,7 +64,7 @@ class Thor
64
64
 
65
65
  protected
66
66
 
67
- def is_generating_demo?
67
+ def is_demo?
68
68
  @config[:demo]
69
69
  end
70
70
 
data/lib/angus/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Angus
2
- VERSION = '0.0.8'
2
+ VERSION = '0.0.9'
3
3
  end
metadata CHANGED
@@ -1,13 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: angus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Pablo Ifran
9
9
  - Adrian Gomez
10
10
  - Gianfranco Zas
11
+ - Gabriel Fagundez
12
+ - Maximo Gomez
13
+ - Guzman Iglesias
14
+ - Martin Cabrera
15
+ - Marcelo Casiraghi
11
16
  autorequire:
12
17
  bindir: bin
13
18
  cert_chain: []
@@ -201,7 +206,7 @@ dependencies:
201
206
  - - ! '>='
202
207
  - !ruby/object:Gem::Version
203
208
  version: '0'
204
- description: angus
209
+ description: Angus is a simple and powerful framework to build REST APIs using Ruby.
205
210
  email:
206
211
  - angus@moove-it.com
207
212
  executables:
@@ -284,7 +289,7 @@ files:
284
289
  - spec/functional/no_resources/definitions/messages.yml
285
290
  - spec/functional/no_resources/definitions/service.yml
286
291
  - bin/angus
287
- homepage: http://mooveit.github.io/angus-sdoc
292
+ homepage: http://moove-it.github.io/angus
288
293
  licenses:
289
294
  - MIT
290
295
  post_install_message:
@@ -308,7 +313,7 @@ rubyforge_project:
308
313
  rubygems_version: 1.8.25
309
314
  signing_key:
310
315
  specification_version: 3
311
- summary: angus
316
+ summary: A web services summary
312
317
  test_files:
313
318
  - spec/spec_helper.rb
314
319
  - spec/angus/request_handler_spec.rb