ask_awesomely 0.2.8 → 0.2.9

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
2
  SHA1:
3
- metadata.gz: a5c6a59774e5d8c8e3c0f103cb91b371783dc12e
4
- data.tar.gz: d940aa05806cd2d4996a792659a5c534e31ed6b0
3
+ metadata.gz: 0c1913658f6a69f4ac165957a1acfdc8962c9e79
4
+ data.tar.gz: 99237e8b4ade837e1ea1204ad3d3a14b8b90cab8
5
5
  SHA512:
6
- metadata.gz: 2725c124b0c5bf0ca51afa9e7e7b7e5fafec65c01b75a54a3d6f7497daa0e5bb14eb28b8b35b39b8beb87c468e0048b13f6024d5b5e54613fe90d05a780b1131
7
- data.tar.gz: 1d6d5230923dd7b2ef820827f2048a341747e746f6142ba72c1a04bd5707c9ce7afb193129bb7f731245bb42caa06080bf35c33d908b35bf9e24a689cde76a84
6
+ metadata.gz: 08b91b44f2abd00498579fcc703a68bc47cb4356376d6bc3e52ca40acd76a60bc50059355ee42354bfbc2bd53cd1d0fd60b47fa4fa75b06a60781ac8cf6a987d
7
+ data.tar.gz: e3a8726f2cc969cecccb201cf74141c546490651253c2b4cae0d99be121261844801ca623b3c0b3f63e6d9122994c3fbc8d7fc9e2136b9d310deea770bdec8ea
@@ -2,7 +2,7 @@ language: ruby
2
2
  rvm:
3
3
  - 2.2.2
4
4
  - 2.2.3
5
- - rbx-2
5
+ - 2.3.1
6
6
  env:
7
7
  global:
8
8
  secure: IiOYP2G1Ufie+zMYz/l/+wnLwej6REZCKgFN+hNUU5//0UugDMQHbVHSLPSEuAu3g8T/9CcPgYLVYcTrsZC9Hn/TtB3Sc8w3OuSELD1prsanMlySjTHDTLmZynmDT/IFWxz2mdKIaFwHKvbipJw+VUxyTiFD/Iu/Ns/goM4+HBemxh2cuomAqPIo2qTKWxl9hpcT3YFf9ylbLKFe6LfnRCygeTK+nY3ooZMP+vC5tnYmLX74FINZKnliG8npNXG0fc7X/W5zzy0vKHGKobirxTqgMERZH1voGCShoVKtH9YISgr9g+JJ8AvVHVr58mjc3U26tChl6MKxMYIc+iscX/aoUEPQ6yPgST+Wj7+ZcFduFg/C3xgs0BoNRsJDLDD37a9uyEJet7iusMARs+X+buimRdEUvddkEdW4SNj76Jqjwsgp09Isl5LOLwUB+xsCE9s6CK3pOOsPHVnultFILsSk86Cre2+E2QEukt4r1cghn+Lf9+sdRwOHnBUT6G3p5S1t313JWNfZGx3auFEXacK5jmDjvqWH6QPUfVZJ25XGlHkVhsv4q09/dJcyr//tPsjD6Yrx2hc+pkIu24o8RPQlmpgTTpb/A3a2xaJOaP+PNJB0yT3LAxabEmvsCZCmmhScScagxTCdlBpP43q/Bjr2RA5Mbd+LVRBh7t/90RI=
data/README.md CHANGED
@@ -182,7 +182,7 @@ A block of text that isn't a question and requires no answer.
182
182
  field :statement do
183
183
  say "what you want to say"
184
184
  button_text "Okay, next question"
185
- show_quotation_marks
185
+ no_quotation_marks
186
186
  end
187
187
  ```
188
188
 
@@ -296,7 +296,7 @@ field :rating do
296
296
  ask "How much did you enjoy Jonny Wiseau's seminal hit, The Room?"
297
297
 
298
298
  steps 10
299
- shape :thumbs_up
299
+ shape "skull"
300
300
  end
301
301
 
302
302
  ```
@@ -6,11 +6,11 @@ module AskAwesomely
6
6
  end
7
7
 
8
8
  def min(min)
9
- @state.min = min
9
+ @state.min_value = min
10
10
  end
11
11
 
12
12
  def max(max)
13
- @state.max = max
13
+ @state.max_value = max
14
14
  end
15
15
 
16
16
  def between(range)
@@ -18,8 +18,8 @@ module AskAwesomely
18
18
  @state.add_other_choice = true
19
19
  end
20
20
 
21
- def hide_labels
22
- @state.labels = false
21
+ def show_labels
22
+ @state.show_labels = true
23
23
  end
24
24
 
25
25
  def align_vertically
@@ -1,11 +1,26 @@
1
1
  module AskAwesomely
2
2
  class Field::Rating < Field::Field
3
3
 
4
- POSSIBLE_STEPS = 3..10
5
- SHAPES = %i(
6
- stars
7
- thumbs_up
8
- )
4
+ POSSIBLE_STEPS = 1..10
5
+ VALID_SHAPES = [
6
+ "star",
7
+ "heart",
8
+ "user",
9
+ "up",
10
+ "crown",
11
+ "cat",
12
+ "dog",
13
+ "circle",
14
+ "flag",
15
+ "droplet",
16
+ "tick",
17
+ "lightbulb",
18
+ "trophy",
19
+ "cloud",
20
+ "thunderbolt",
21
+ "pencil",
22
+ "skull"
23
+ ]
9
24
 
10
25
  def initialize(*)
11
26
  super
@@ -20,8 +35,8 @@ module AskAwesomely
20
35
  end
21
36
 
22
37
  def shape(shape)
23
- unless SHAPES.include?(shape)
24
- raise ArgumentError, "shape must be one of: #{SHAPES.join(", ")}"
38
+ unless VALID_SHAPES.include?(shape)
39
+ raise ArgumentError, "shape must be one of: #{VALID_SHAPES.join(", ")}"
25
40
  end
26
41
 
27
42
  @state.shape = shape
@@ -5,8 +5,8 @@ module AskAwesomely
5
5
  super
6
6
  end
7
7
 
8
- def show_quotation_marks
9
- @state.has_marks = true
8
+ def no_quotation_marks
9
+ @state.hide_marks = true
10
10
  end
11
11
 
12
12
  def button_text(text)
@@ -1,26 +1,26 @@
1
1
  module AskAwesomely
2
2
  class Typeform
3
-
4
- attr_reader :links, :id, :structure
3
+ attr_reader :links, :id, :structure, :fields
5
4
 
6
5
  def initialize(structure)
7
6
  @structure = structure
7
+ @fields = []
8
8
  end
9
9
 
10
10
  def title
11
11
  @structure.class._state.title
12
12
  end
13
-
13
+
14
14
  def public_url
15
- @public_url ||= links.find {|link|
16
- link["rel"] == "form_render"
17
- }.fetch("href")
15
+ @public_url ||= links.find do |link|
16
+ link['rel'] == 'form_render'
17
+ end.fetch('href')
18
18
  end
19
19
 
20
20
  def private_url
21
- @private_url ||= links.find {|link|
22
- link["rel"] == "self"
23
- }.fetch("href")
21
+ @private_url ||= links.find do |link|
22
+ link['rel'] == 'self'
23
+ end.fetch('href')
24
24
  end
25
25
 
26
26
  def embed_as(type, options = {})
@@ -28,13 +28,13 @@ module AskAwesomely
28
28
  end
29
29
 
30
30
  def update_with_api_response(response)
31
- @links = response["_links"]
32
- @id = response["id"]
31
+ @links = response['_links']
32
+ @id = response['id']
33
+ @fields = response['fields']
33
34
  end
34
35
 
35
36
  def to_json
36
37
  @structure.to_json
37
38
  end
38
-
39
39
  end
40
40
  end
@@ -1,3 +1,3 @@
1
1
  module AskAwesomely
2
- VERSION = "0.2.8"
2
+ VERSION = "0.2.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ask_awesomely
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Machin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-19 00:00:00.000000000 Z
11
+ date: 2016-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk