pebbles_audio_files 1.0.0

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/Rakefile ADDED
@@ -0,0 +1,15 @@
1
+
2
+ begin
3
+ require 'jeweler'
4
+ Jeweler::Tasks.new do |gemspec|
5
+ gemspec.name = "pebbles_audio_files"
6
+ gemspec.summary = "Upload audio files for products"
7
+ gemspec.description = "See summary"
8
+ gemspec.email = "dev@entryway.net"
9
+ gemspec.homepage = "http://github.com/entryway/pebbles_audio_files"
10
+ gemspec.authors = ["Ryan Smith", "Bobby Wilson"]
11
+ end
12
+ Jeweler::GemcutterTasks.new
13
+ rescue LoadError
14
+ puts "Jeweler not available. Install it with: gem install jeweler"
15
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.0
data/bin/rake ADDED
@@ -0,0 +1,19 @@
1
+ #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
2
+ #
3
+ # This file was generated by RubyGems.
4
+ #
5
+ # The application 'rake' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'rubygems'
10
+
11
+ version = ">= 0"
12
+
13
+ if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then
14
+ version = $1
15
+ ARGV.shift
16
+ end
17
+
18
+ gem 'rake', version
19
+ load Gem.bin_path('rake', 'rake', version)
@@ -0,0 +1,6 @@
1
+ Description:
2
+ Sets up the the extension
3
+
4
+ Examples:
5
+ `./script/generate pebbles_audio_files`
6
+
@@ -0,0 +1,22 @@
1
+ require 'rails_generator'
2
+
3
+ class PebblesAudioFilesGenerator < Rails::Generator::Base
4
+
5
+ def manifest
6
+ record do |m|
7
+ audio_clip_model = "app/models/audio_clip.rb"
8
+ if File.exists?(audio_clip_model)
9
+ m.insert_into audio_clip_model, "include PebblesAudioClip::Models::AudioClip"
10
+ else
11
+ m.directory File.join("app","models")
12
+ m.file "audio_clip.rb", audio_clip_model
13
+ end
14
+
15
+ m.migration_template "migrations/create_audio_clips.rb",
16
+ 'db/migrate',
17
+ :migration_file_name => "pebbles_audio_files_create_audio_clips"
18
+
19
+ end
20
+ end
21
+
22
+ end
@@ -0,0 +1,3 @@
1
+ class PebblesAudioClip::AudioClip < ActiveRecord::Base
2
+ include PebblesAudioClip::Models::AudioClip
3
+ end
@@ -0,0 +1,14 @@
1
+ class CreateAudioClips < ActiveRecord::Migration
2
+
3
+ def self.up
4
+ create_table :audio_clips do |t|
5
+ t.string :audio_file
6
+ t.references :audioable, :polymorphic => true
7
+ t.timestamps
8
+ end
9
+ end
10
+
11
+ def self.down
12
+ drop_table :audio_clips
13
+ end
14
+ end
@@ -0,0 +1,18 @@
1
+ module PebblesAudioFiles::Models
2
+
3
+ module AudioClip
4
+ def self.included(base)
5
+ base.send(:extend, ClassMethods)
6
+ base.send(:include, InstanceMethods)
7
+
8
+ base.belongs_to :audioable, :polymorphic => true
9
+ end
10
+
11
+ module ClassMethods
12
+ end
13
+ module InstanceMethods
14
+ end
15
+
16
+ end
17
+
18
+ end
@@ -0,0 +1,17 @@
1
+ module PebblesAudioFiles::Models
2
+
3
+ module Product
4
+ def self.included(base)
5
+ base.send(:extend, ClassMethods)
6
+ base.send(:include, InstanceMethods)
7
+ base.has_many :audio_clips, :as => :audioable
8
+ end
9
+
10
+ module ClassMethods
11
+ end
12
+ module InstanceMethods
13
+ end
14
+
15
+ end
16
+
17
+ end
@@ -0,0 +1,9 @@
1
+ namespace :pebbles do
2
+ namespace :extensions do
3
+ namespace :pebbles_audio_files do
4
+ task :install do
5
+ puts "installing audio files"
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,47 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{pebbles_audio_files}
8
+ s.version = "1.0.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Ryan Smith", "Bobby Wilson"]
12
+ s.date = %q{2010-09-24}
13
+ s.default_executable = %q{rake}
14
+ s.description = %q{See summary}
15
+ s.email = %q{dev@entryway.net}
16
+ s.executables = ["rake"]
17
+ s.files = [
18
+ "Rakefile",
19
+ "VERSION",
20
+ "generators/pebbles_audio_files/USAGE",
21
+ "generators/pebbles_audio_files/pebbles_audio_files_generator.rb",
22
+ "generators/pebbles_audio_files/templates/audio_clip.rb",
23
+ "generators/pebbles_audio_files/templates/migrations/create_audio_clips.rb",
24
+ "lib/pebbles_audio_files/models/audio_clip.rb",
25
+ "lib/pebbles_audio_files/models/product.rb",
26
+ "lib/pebbles_audio_files/tasks.rb",
27
+ "pebbles_audio_files.gemspec",
28
+ "pebbles_audio_files.rb",
29
+ "rails/init.rb"
30
+ ]
31
+ s.homepage = %q{http://github.com/entryway/pebbles_audio_files}
32
+ s.rdoc_options = ["--charset=UTF-8"]
33
+ s.require_paths = ["lib"]
34
+ s.rubygems_version = %q{1.3.7}
35
+ s.summary = %q{Upload audio files for products}
36
+
37
+ if s.respond_to? :specification_version then
38
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
39
+ s.specification_version = 3
40
+
41
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
42
+ else
43
+ end
44
+ else
45
+ end
46
+ end
47
+
@@ -0,0 +1,2 @@
1
+ Dir[File.dirname(__FILE__) + 'lib/**/*.rb'].each {|file| require file}
2
+ Dir[File.dirname(__FILE__) + 'generators/**/*.rb'].each {|file| require file}
data/rails/init.rb ADDED
@@ -0,0 +1,4 @@
1
+ require File.expand_path(File.dirname(__FILE__) + "/../pebbles_audio_files")
2
+ require 'rails_generator'
3
+ Dir[File.dirname(__FILE__) + 'generators/**/*.rb'].each {|file| require file}
4
+ Product.send(:include, PebblesAudioFiles::Models::Product)
metadata ADDED
@@ -0,0 +1,80 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pebbles_audio_files
3
+ version: !ruby/object:Gem::Version
4
+ hash: 23
5
+ prerelease: false
6
+ segments:
7
+ - 1
8
+ - 0
9
+ - 0
10
+ version: 1.0.0
11
+ platform: ruby
12
+ authors:
13
+ - Ryan Smith
14
+ - Bobby Wilson
15
+ autorequire:
16
+ bindir: bin
17
+ cert_chain: []
18
+
19
+ date: 2010-09-24 00:00:00 -06:00
20
+ default_executable: rake
21
+ dependencies: []
22
+
23
+ description: See summary
24
+ email: dev@entryway.net
25
+ executables:
26
+ - rake
27
+ extensions: []
28
+
29
+ extra_rdoc_files: []
30
+
31
+ files:
32
+ - Rakefile
33
+ - VERSION
34
+ - generators/pebbles_audio_files/USAGE
35
+ - generators/pebbles_audio_files/pebbles_audio_files_generator.rb
36
+ - generators/pebbles_audio_files/templates/audio_clip.rb
37
+ - generators/pebbles_audio_files/templates/migrations/create_audio_clips.rb
38
+ - lib/pebbles_audio_files/models/audio_clip.rb
39
+ - lib/pebbles_audio_files/models/product.rb
40
+ - lib/pebbles_audio_files/tasks.rb
41
+ - pebbles_audio_files.gemspec
42
+ - pebbles_audio_files.rb
43
+ - rails/init.rb
44
+ - bin/rake
45
+ has_rdoc: true
46
+ homepage: http://github.com/entryway/pebbles_audio_files
47
+ licenses: []
48
+
49
+ post_install_message:
50
+ rdoc_options:
51
+ - --charset=UTF-8
52
+ require_paths:
53
+ - lib
54
+ required_ruby_version: !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ hash: 3
60
+ segments:
61
+ - 0
62
+ version: "0"
63
+ required_rubygems_version: !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ hash: 3
69
+ segments:
70
+ - 0
71
+ version: "0"
72
+ requirements: []
73
+
74
+ rubyforge_project:
75
+ rubygems_version: 1.3.7
76
+ signing_key:
77
+ specification_version: 3
78
+ summary: Upload audio files for products
79
+ test_files: []
80
+