fern-api 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 19721635a12a3849db3ef7dcb7bc35672ea8debd
4
- data.tar.gz: 7a801ad72725610d2e3bb5c38f2bc595d73b18fb
2
+ SHA256:
3
+ metadata.gz: a192bbac7c87bf1ce3dea880a6844b24b30a86c1f95d1889ac38435b295574f0
4
+ data.tar.gz: 82c57d7b8b9040b8d32b428ce542cd02b5628da50069146fedf4d0830cbe175d
5
5
  SHA512:
6
- metadata.gz: bc9a1a395974ab27d2ea6d3f875a920f0279b4a264508032310d6f38005818ecb208b8e49374be0c511f386a24eb56ab3796eed588e518d46a2a9700d97f8636
7
- data.tar.gz: f8c2163acb73d055af581d62b50f57190aebb4e238e3f2a95ac638c699c9fb223df0f5a56b6a133337ee4c189e1e84898de4f248331c9cb8c56db0c5e4489600
6
+ metadata.gz: e8413ece16d6a6a2315cb75e8660982f724dd0b048ffa0a12cab84f087c783c216c1c5e5964956ef97eb30119cdc8a2251b0370cae230f6b2749bae1c7cfb53d
7
+ data.tar.gz: 5b4d0c9f8573e054c3f0bf4ccea9ea99927c47ffccecca6a2357f8e3aecae8204c526bb4ffdc9d54f72ce31e9fd052c1a9cd9ee953addd2feff87978069ba1c9
data/lib/fern/api.rb CHANGED
@@ -8,14 +8,11 @@ module Fern
8
8
 
9
9
  included do
10
10
  class_eval { class_attribute :fern }
11
- self.fern = {}
12
- def present(obj)
13
- render json: obj
14
- end
15
11
  end
16
12
 
17
13
  class_methods do
18
14
  def endpoint(name, &block)
15
+ self.fern ||= {}
19
16
  fern[name] = {}
20
17
  Endpoint.new(self, name: name, &block)
21
18
  end
@@ -24,5 +21,3 @@ module Fern
24
21
  end
25
22
  end
26
23
  end
27
-
28
- ActiveSupport.on_load(:action_controller) { include Fern::Api }
@@ -11,17 +11,6 @@ module Fern
11
11
  def request(&block)
12
12
  @controller.send(:define_method, @name, &block)
13
13
  end
14
-
15
- def form(key = nil, klass)
16
- @controller.fern[@name][:form] = {
17
- key: key,
18
- klass: klass
19
- }
20
- end
21
-
22
- def presenter(klass)
23
- @controller.fern[@name][:presenter] = klass
24
- end
25
14
  end
26
15
  end
27
16
  end
@@ -1,5 +1,5 @@
1
1
  module Fern
2
2
  module Api
3
- VERSION = '0.0.7'.freeze
3
+ VERSION = '0.0.8'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,10 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fern-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Kestell
8
+ - Ryan Andersen
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
@@ -30,44 +31,60 @@ dependencies:
30
31
  requirements:
31
32
  - - "~>"
32
33
  - !ruby/object:Gem::Version
33
- version: '10.0'
34
+ version: '12.0'
34
35
  type: :development
35
36
  prerelease: false
36
37
  version_requirements: !ruby/object:Gem::Requirement
37
38
  requirements:
38
39
  - - "~>"
39
40
  - !ruby/object:Gem::Version
40
- version: '10.0'
41
+ version: '12.0'
41
42
  - !ruby/object:Gem::Dependency
42
- name: actionpack
43
+ name: rubocop
43
44
  requirement: !ruby/object:Gem::Requirement
44
45
  requirements:
45
46
  - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: 0.74.0
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: 0.74.0
56
+ - !ruby/object:Gem::Dependency
57
+ name: actionpack
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
46
61
  - !ruby/object:Gem::Version
47
62
  version: '5.0'
48
63
  type: :runtime
49
64
  prerelease: false
50
65
  version_requirements: !ruby/object:Gem::Requirement
51
66
  requirements:
52
- - - "~>"
67
+ - - ">="
53
68
  - !ruby/object:Gem::Version
54
69
  version: '5.0'
55
70
  - !ruby/object:Gem::Dependency
56
71
  name: activesupport
57
72
  requirement: !ruby/object:Gem::Requirement
58
73
  requirements:
59
- - - "~>"
74
+ - - ">="
60
75
  - !ruby/object:Gem::Version
61
76
  version: '5.0'
62
77
  type: :runtime
63
78
  prerelease: false
64
79
  version_requirements: !ruby/object:Gem::Requirement
65
80
  requirements:
66
- - - "~>"
81
+ - - ">="
67
82
  - !ruby/object:Gem::Version
68
83
  version: '5.0'
69
84
  description: API DSL for Fern.
70
- email: kyle@kestell.org
85
+ email:
86
+ - kyle@kestell.org
87
+ - itsryanandersen@gmail.com
71
88
  executables: []
72
89
  extensions: []
73
90
  extra_rdoc_files: []
@@ -95,8 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
112
  - !ruby/object:Gem::Version
96
113
  version: '0'
97
114
  requirements: []
98
- rubyforge_project:
99
- rubygems_version: 2.6.14
115
+ rubygems_version: 3.0.6
100
116
  signing_key:
101
117
  specification_version: 4
102
118
  summary: Fern API