rest_kat 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/rest_kat.rb +39 -36
  3. data/rest_kat.gemspec +2 -2
  4. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.12
1
+ 0.0.13
data/lib/rest_kat.rb CHANGED
@@ -428,61 +428,64 @@ module RestKat
428
428
  end
429
429
  end
430
430
 
431
+ require 'rake/task.rb'
432
+
431
433
  module RestKat
432
434
 
435
+
433
436
  class MySugrIphone
434
- class <<self
435
- def root
436
- ENV["MYSUGR_IPHONE_ROOT"]
437
- end
438
- end
439
- end
437
+ include Rake::DSL
440
438
 
441
- def self.generate_item(api_location, schema_location, ext)
442
- deps = %w[
439
+ def generate_item(api_location, schema_location, ext)
440
+ deps = %w[
443
441
  model.h.erb
444
442
  model.m.erb
445
443
  rest_kat.rb
446
- ].collect do |d|
447
- File.expand_path "../#{d}", __FILE__
448
- end
444
+ ].collect do |d|
445
+ File.expand_path "../#{d}", __FILE__
446
+ end
449
447
 
450
- deps << schema_location
448
+ deps << schema_location
451
449
 
452
- file = "#{api_location}.#{ext}"
450
+ file = "#{api_location}.#{ext}"
453
451
 
454
- file_task = Rake::FileTask.define_task file => deps do
455
- File.open file, 'w' do |f|
456
- puts "Generating #{file}"
457
- f.write RestKat::IosMapping.new(schema_location).send("to_#{ext}", file)
458
- end
459
- end
460
- end
452
+ file_task = Rake::FileTask.define_task file => deps do
453
+ File.open file, 'w' do |f|
454
+ puts "Generating #{file}"
455
+ f.write RestKat::IosMapping.new(schema_location).send("to_#{ext}", file)
456
+ end
457
+ end
458
+ end
461
459
 
462
- def self.generate_api(api_location, schema_location)
463
460
 
464
- api_src = File.join api_location, "MSRestApiAutoGen"
465
- m_file_task = generate_item(api_src, schema_location, "h")
466
- h_file_task = generate_item(api_src, schema_location, "m")
461
+ def generate_api(api_location, schema_location)
467
462
 
468
- src_path = File.expand_path "../../src", __FILE__
463
+ api_src = File.join api_location, "MSRestApiAutoGen"
464
+ m_file_task = generate_item(api_src, schema_location, "h")
465
+ h_file_task = generate_item(api_src, schema_location, "m")
469
466
 
470
- src_h = File.join src_path, "MSRestSerializable.h"
471
- src_m = File.join src_path, "MSRestSerializable.m"
467
+ src_path = File.expand_path "../../src", __FILE__
472
468
 
473
- tgt_h = File.join api_location, "MSRestSerializable.h"
474
- tgt_m = File.join api_location, "MSRestSerializable.m"
469
+ src_h = File.join src_path, "MSRestSerializable.h"
470
+ src_m = File.join src_path, "MSRestSerializable.m"
475
471
 
472
+ tgt_h = File.join api_location, "MSRestSerializable.h"
473
+ tgt_m = File.join api_location, "MSRestSerializable.m"
476
474
 
477
- t0 = file tgt_h => src_h do
478
- cp src_h, tgt_h, :verbose => true
479
- end
480
475
 
481
- t1 = file tgt_m => src_m do
482
- cp src_m, tgt_m, :verbose => true
483
- end
476
+ t0 = file tgt_h => src_h do
477
+ cp src_h, tgt_h, :verbose => true
478
+ end
484
479
 
485
- Rake::Task.define_task :type => [m_file_task, h_file_task, t0, t1]
480
+ t1 = file tgt_m => src_m do
481
+ cp src_m, tgt_m, :verbose => true
482
+ end
483
+
484
+ Rake::Task.define_task :type => [m_file_task, h_file_task, t0, t1]
485
+ end
486
486
  end
487
487
 
488
+ def self.generate_api(api_location, schema_location)
489
+ MySugrIphone.new.generate_api(api_location, schema_location)
490
+ end
488
491
  end
data/rest_kat.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rest_kat}
8
- s.version = "0.0.12"
8
+ s.version = "0.0.13"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = [%q{Brad Phelan}]
12
- s.date = %q{2011-12-02}
12
+ s.date = %q{2011-12-12}
13
13
  s.description = %q{The generated source code is a layer on top of the iOS REST framework http://restkit.org/}
14
14
  s.email = %q{brad.phelan@mysugr.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rest_kat
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.12
5
+ version: 0.0.13
6
6
  platform: ruby
7
7
  authors:
8
8
  - Brad Phelan
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-12-02 00:00:00 Z
13
+ date: 2011-12-12 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: kwalify
@@ -110,7 +110,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
110
110
  requirements:
111
111
  - - ">="
112
112
  - !ruby/object:Gem::Version
113
- hash: 275688353468508482
113
+ hash: 3583557775326466182
114
114
  segments:
115
115
  - 0
116
116
  version: "0"