showtube 0.0.1 → 0.0.2

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.
@@ -1,7 +1,7 @@
1
1
  module Showtube
2
2
  module ApplicationHelper
3
3
  #youtube videos
4
- def youtube_tag(vid, shwidth, shheight, html_options = {})
4
+ def showtube_tag(vid, shwidth, shheight, html_options = {})
5
5
  %{<iframe width="#{shwidth}" height="#{shheight}" src="http://www.youtube.com/embed/#{vid}" frameborder="0" allowfullscreen></iframe>}.html_safe
6
6
  end
7
7
 
@@ -15,6 +15,14 @@
15
15
  <%= f.label :title %><br />
16
16
  <%= f.text_field :title %>
17
17
  </div>
18
+ <div class="field">
19
+ <%= f.label "video size" %>
20
+ <%= f.text_field :shwidth %> x <%= f.text_field :shheight %>
21
+ </div>
22
+ <div class="field">
23
+ <%= f.label "image size" %>
24
+ <%= f.text_field :imwidth %> x <%= f.text_field :imheight %>
25
+ </div>
18
26
  <div class="field">
19
27
  <%= f.label :url %><br />
20
28
  <%= f.text_field :url %>
@@ -1,19 +1,11 @@
1
1
  <h1>Listing videos</h1>
2
2
 
3
3
  <table>
4
- <tr>
5
- <th>Title</th>
6
- <th>Url</th>
7
- <th>Description</th>
8
- <th></th>
9
- <th></th>
10
- <th></th>
11
- </tr>
12
4
 
13
5
  <% @videos.each do |video| %>
14
6
  <tr>
15
7
  <td><%= video.title %></td>
16
- <td><%= video.url %></td>
8
+ <td></td>
17
9
  <td><%= video.description %></td>
18
10
  <td><%= link_to 'Show', video %></td>
19
11
  <td><%= link_to 'Edit', edit_video_path(video) %></td>
@@ -6,8 +6,7 @@
6
6
  </p>
7
7
 
8
8
  <p>
9
- <b>Url:</b>
10
- <%= @video.url %>
9
+ <%= showtube_tag(@video.vid) %>
11
10
  </p>
12
11
 
13
12
  <p>
@@ -1,3 +1,3 @@
1
1
  module Showtube
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: showtube
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-03-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &2151889400 !ruby/object:Gem::Requirement
16
+ requirement: &2151906080 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.2.2
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2151889400
24
+ version_requirements: *2151906080
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sqlite3
27
- requirement: &2151888200 !ruby/object:Gem::Requirement
27
+ requirement: &2151905520 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *2151888200
35
+ version_requirements: *2151905520
36
36
  description: Showtube is a youtube videos show.
37
37
  email:
38
38
  - pedrohenriqueacruz@gmail.com