gfrom 0.2.02 → 0.2.03
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/gfrom.gemspec +2 -2
 - data/readme.md +25 -2
 - metadata +3 -3
 
    
        data/gfrom.gemspec
    CHANGED
    
    | 
         @@ -5,12 +5,12 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) 
     | 
|
| 
       5 
5 
     | 
    
         
             
            Gem::Specification.new do |spec|
         
     | 
| 
       6 
6 
     | 
    
         
             
              spec.platform      = Gem::Platform::RUBY
         
     | 
| 
       7 
7 
     | 
    
         
             
              spec.name          = "gfrom"
         
     | 
| 
       8 
     | 
    
         
            -
              spec.version       = "0.2. 
     | 
| 
      
 8 
     | 
    
         
            +
              spec.version       = "0.2.03"
         
     | 
| 
       9 
9 
     | 
    
         
             
              spec.authors       = ["Marvin Marcelo"]
         
     | 
| 
       10 
10 
     | 
    
         
             
              spec.email         = ["mrclmrvn@gmail.com"]
         
     | 
| 
       11 
11 
     | 
    
         
             
              spec.description   = %q{Wrap Google Form within your site}
         
     | 
| 
       12 
12 
     | 
    
         
             
              spec.summary       = %q{From Google Form}
         
     | 
| 
       13 
     | 
    
         
            -
              spec.homepage      = " 
     | 
| 
      
 13 
     | 
    
         
            +
              spec.homepage      = "http://www.marvinmarcelo.com/gfrom-from-google-form/"
         
     | 
| 
       14 
14 
     | 
    
         
             
              spec.license       = "MIT"
         
     | 
| 
       15 
15 
     | 
    
         | 
| 
       16 
16 
     | 
    
         
             
              spec.files         = `git ls-files`.split($/)
         
     | 
    
        data/readme.md
    CHANGED
    
    | 
         @@ -2,7 +2,7 @@ 
     | 
|
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            Wrap Google Form in your website. Useful for collecting data from your users without a database, and if you hate country restrictions of the form services out there. Plus you can style it your on way.
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
     | 
    
         
            -
            Just create a form from your google account and copy the published URL. If you are using Google Apps, please read [form options](http://support.google.com/drive/bin/answer.py?hl=en&answer=160166), make sure ` 
     | 
| 
      
 5 
     | 
    
         
            +
            Just create a form from your google account and copy the published URL. If you are using Google Apps, please read [form options](http://support.google.com/drive/bin/answer.py?hl=en&answer=160166), make sure `Require sign-in to view this form` is unchecked.
         
     | 
| 
       6 
6 
     | 
    
         | 
| 
       7 
7 
     | 
    
         
             
            ## Installation
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
         @@ -46,15 +46,38 @@ result = @myform.submit(params) 
     | 
|
| 
       46 
46 
     | 
    
         
             
            # or false otherwise, and an error message, which would probably unsatisfied required fields
         
     | 
| 
       47 
47 
     | 
    
         
             
            ```
         
     | 
| 
       48 
48 
     | 
    
         | 
| 
      
 49 
     | 
    
         
            +
            In haml:
         
     | 
| 
      
 50 
     | 
    
         
            +
             
     | 
| 
      
 51 
     | 
    
         
            +
            ```haml
         
     | 
| 
      
 52 
     | 
    
         
            +
            - @myform.fields.each do |node|
         
     | 
| 
      
 53 
     | 
    
         
            +
              - if node[:type] != "hidden"
         
     | 
| 
      
 54 
     | 
    
         
            +
                .inputline
         
     | 
| 
      
 55 
     | 
    
         
            +
                  - element = node.delete(:element)
         
     | 
| 
      
 56 
     | 
    
         
            +
                  %label{:for => node[:id]}=node[:label] if node[:label]
         
     | 
| 
      
 57 
     | 
    
         
            +
                  - if element == "input"
         
     | 
| 
      
 58 
     | 
    
         
            +
                    %input{node}
         
     | 
| 
      
 59 
     | 
    
         
            +
                  - if element == "textarea"
         
     | 
| 
      
 60 
     | 
    
         
            +
                    %textarea{node}
         
     | 
| 
      
 61 
     | 
    
         
            +
              - else
         
     | 
| 
      
 62 
     | 
    
         
            +
                %input{node}
         
     | 
| 
      
 63 
     | 
    
         
            +
            ```
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
       49 
65 
     | 
    
         
             
            ## TODO
         
     | 
| 
       50 
66 
     | 
    
         | 
| 
       51 
67 
     | 
    
         
             
            * Retain form values on unsuccesful submit
         
     | 
| 
       52 
68 
     | 
    
         
             
            * Fields with error after submit
         
     | 
| 
      
 69 
     | 
    
         
            +
            * Warn or raise exception if form is disabled (Accepting Responses is unchecked)
         
     | 
| 
      
 70 
     | 
    
         
            +
            * Provide a sample template for rails app
         
     | 
| 
       53 
71 
     | 
    
         
             
            * Label for grouped form tags - checkbox and radio
         
     | 
| 
       54 
72 
     | 
    
         
             
            * Support for getting select form tag (use radio button for now)
         
     | 
| 
       55 
73 
     | 
    
         
             
            * Support for Authenticated forms (requires login to organization/google apps)
         
     | 
| 
       56 
74 
     | 
    
         
             
            * Supply an RDOC
         
     | 
| 
       57 
     | 
    
         
            -
             
     | 
| 
      
 75 
     | 
    
         
            +
             
     | 
| 
      
 76 
     | 
    
         
            +
            ## Good to have
         
     | 
| 
      
 77 
     | 
    
         
            +
             
     | 
| 
      
 78 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 79 
     | 
    
         
            +
            <%= f.send(field.type.to_sym, field.name) %>
         
     | 
| 
      
 80 
     | 
    
         
            +
            ```
         
     | 
| 
       58 
81 
     | 
    
         | 
| 
       59 
82 
     | 
    
         
             
            ## Contributing
         
     | 
| 
       60 
83 
     | 
    
         | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: gfrom
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.2. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.2.03
         
     | 
| 
       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: 2013-05- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2013-05-20 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: curb
         
     | 
| 
         @@ -159,7 +159,7 @@ files: 
     | 
|
| 
       159 
159 
     | 
    
         
             
            - spec/support/gfrom/form_default.html
         
     | 
| 
       160 
160 
     | 
    
         
             
            - spec/support/gfrom/form_error.html
         
     | 
| 
       161 
161 
     | 
    
         
             
            - spec/support/gfrom/form_success.html
         
     | 
| 
       162 
     | 
    
         
            -
            homepage:  
     | 
| 
      
 162 
     | 
    
         
            +
            homepage: http://www.marvinmarcelo.com/gfrom-from-google-form/
         
     | 
| 
       163 
163 
     | 
    
         
             
            licenses:
         
     | 
| 
       164 
164 
     | 
    
         
             
            - MIT
         
     | 
| 
       165 
165 
     | 
    
         
             
            post_install_message: 
         
     |