rudsl_rails 1.2.0 → 1.2.1

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: fe82b6f652b8b085efe22330fe8260d3f4495ed4
4
- data.tar.gz: 434373a70b29474a9b678706fe3770eda5bbc4e2
3
+ metadata.gz: b404445f40aecc2597d17f8343176ec8205412a4
4
+ data.tar.gz: 8277e0aa2fedb5905d8e606e8f15b82ca6e4d47c
5
5
  SHA512:
6
- metadata.gz: 6520d3c780a1e4df5f31e854cfd496d2cc30698942ad2ac66290165ba23ab739f04af22b552daba74051a87ef6b60ef4bb05c544b3bf65b9f397fb3895368a86
7
- data.tar.gz: 8d76536fc90b7dee618aa79f7a78f7ed4298a9fa27862ef8a0685585fa12ad1909a3729705330614484ef720a1994e8b4fe7b06b4e0facd54e33a85b5412e65a
6
+ metadata.gz: 2a4bae32d55cd250b9dc1613f240034859ee2441c6ac8f4454a94ab4e07c2f12a33feea41d4dde4093cdb1360d5f556792558fa7499d49df16437ec727176322
7
+ data.tar.gz: f685221e2ecda263469c708412dabb6ee6993a0054a20c5cd5679dfe2a5f7a0b803f43e012a2f6aacd0928f84d547967a0a56417dd84ae08d07398a92f785c52
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # RudslRails
2
2
 
3
- TODO: Write a gem description
3
+ rudsl_rails makes it easier to use rudsl in your Rails project. The recommended organisation of your rudsl views are into cards that can be rendered directly, or as part of an non-rudsl view.
4
4
 
5
5
  ## Installation
6
6
 
@@ -14,17 +14,45 @@ And then execute:
14
14
 
15
15
  $ bundle
16
16
 
17
- Or install it yourself as:
17
+ ## Usage
18
18
 
19
- $ gem install rudsl_rails
19
+ The gem provides a generator to help organise the cards. Run
20
20
 
21
- ## Usage
21
+ ```ruby
22
+ rails generate rudsl_card users/profile
23
+ ```
24
+
25
+ This will generate a new card in `app/cards/users/` called `profile_card.rb` which can be used as follows:
22
26
 
23
- TODO: Write usage instructions here
27
+ ```ruby
28
+ render html: Users::ProfileCard.new(current_user).html
29
+ ```
30
+
31
+ assuming, that the `profile_card.rb` looks as follows:
32
+
33
+ ```ruby
34
+ class Users:ProfileCard < RudslRails::Card
35
+ attr_reader :user
36
+
37
+ def initialize(user)
38
+ @user = user
39
+ end
40
+
41
+ def node
42
+ div class: 'profile-card' do
43
+ h3 user.name
44
+ img src: user.photo.url, class: 'responsive-image'
45
+ p do
46
+ user.bio
47
+ end
48
+ end
49
+ end
50
+ end
51
+ ```
24
52
 
25
53
  ## Contributing
26
54
 
27
- 1. Fork it ( https://github.com/[my-github-username]/rudsl_rails/fork )
55
+ 1. Fork it ( https://github.com/sparkymat/rudsl_rails/fork )
28
56
  2. Create your feature branch (`git checkout -b my-new-feature`)
29
57
  3. Commit your changes (`git commit -am 'Add some feature'`)
30
58
  4. Push to the branch (`git push origin my-new-feature`)
@@ -1,3 +1,3 @@
1
1
  module RudslRails
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
@@ -22,5 +22,5 @@ Gem::Specification.new do |spec|
22
22
  spec.add_development_dependency "rake", "~> 10.0"
23
23
 
24
24
  spec.add_runtime_dependency "rails", ">= 4.0"
25
- spec.add_runtime_dependency "rudsl", ">= 1.0"
25
+ spec.add_runtime_dependency "rudsl", ">= 1.0.1"
26
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rudsl_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ajith Hussain
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-05 00:00:00.000000000 Z
11
+ date: 2015-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '1.0'
61
+ version: 1.0.1
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '1.0'
68
+ version: 1.0.1
69
69
  description: rudsl_rails helps organise your Rails views written in rudsl, through
70
70
  cards.
71
71
  email: