motion-rails-model 0.0.1.1 → 0.0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -19,4 +19,5 @@ tmp
19
19
  build
20
20
  resources/*.nib
21
21
  resources/*.momd
22
- resources/*.storyboardc
22
+ resources/*.storyboardc
23
+ .dat*
@@ -1,7 +1,11 @@
1
1
  class AppDelegate
2
2
  def application(application, didFinishLaunchingWithOptions:launchOptions)
3
+ RM::Model.set_url("http://localhost:3000/")
4
+ RM::Model.set_username("username")
5
+ RM::Model.set_password("password")
6
+
3
7
  @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
4
- @window.rootViewController = UIViewController.alloc.init
8
+ @window.rootViewController = RootViewController.alloc.init
5
9
  @window.makeKeyAndVisible
6
10
  true
7
11
  end
@@ -0,0 +1,14 @@
1
+ class RootViewController < UIViewController
2
+
3
+ def viewDidLoad
4
+ super
5
+ Entries.all do |result|
6
+ if result
7
+ p result
8
+ else
9
+ p "error"
10
+ end
11
+ end
12
+ end
13
+
14
+ end
@@ -0,0 +1,2 @@
1
+ class Entries < RM::Model
2
+ end
@@ -73,7 +73,7 @@ module RM
73
73
  block.call(self.class.new(json))
74
74
  end
75
75
  else
76
- raise response.status_code
76
+ block.call(nil)
77
77
  end
78
78
  end
79
79
  end
@@ -1,5 +1,5 @@
1
1
  module RM
2
2
  class Model
3
- VERSION = "0.0.1.1"
3
+ VERSION = "0.0.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-rails-model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.1
4
+ version: 0.0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-27 00:00:00.000000000 Z
12
+ date: 2012-09-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bubble-wrap
@@ -39,7 +39,9 @@ files:
39
39
  - LICENSE
40
40
  - README.md
41
41
  - Rakefile
42
- - app/app_delegate.rb
42
+ - app/controller/app_delegate.rb
43
+ - app/controller/root_view_controller.rb
44
+ - app/model/entries.rb
43
45
  - lib/motion-rails-model.rb
44
46
  - lib/motion-rails-model/model.rb
45
47
  - lib/motion-rails-model/version.rb