aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/active_job.rb33
-rw-r--r--lib/active_job/base.rb4
-rw-r--r--lib/active_job/gem_version.rb15
-rw-r--r--lib/active_job/version.rb8
4 files changed, 60 insertions, 0 deletions
diff --git a/lib/active_job.rb b/lib/active_job.rb
new file mode 100644
index 0000000000..ba18cc093a
--- /dev/null
+++ b/lib/active_job.rb
@@ -0,0 +1,33 @@
+#--
+# Copyright (c) 2014 David Heinemeier Hansson
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#++
+
+require 'active_support'
+require 'active_support/rails'
+
+require 'active_job/version'
+
+module ActiveJob
+ extend ActiveSupport::Autoload
+
+ autoload :Base
+end \ No newline at end of file
diff --git a/lib/active_job/base.rb b/lib/active_job/base.rb
new file mode 100644
index 0000000000..f2c76c1811
--- /dev/null
+++ b/lib/active_job/base.rb
@@ -0,0 +1,4 @@
+module ActiveJob
+ class Base
+ end
+end \ No newline at end of file
diff --git a/lib/active_job/gem_version.rb b/lib/active_job/gem_version.rb
new file mode 100644
index 0000000000..c166020b28
--- /dev/null
+++ b/lib/active_job/gem_version.rb
@@ -0,0 +1,15 @@
+module ActiveJob
+ # Returns the version of the currently loaded ActiveJob as a <tt>Gem::Version</tt>
+ def self.gem_version
+ Gem::Version.new VERSION::STRING
+ end
+
+ module VERSION
+ MAJOR = 4
+ MINOR = 2
+ TINY = 0
+ PRE = "alpha"
+
+ STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
+ end
+end
diff --git a/lib/active_job/version.rb b/lib/active_job/version.rb
new file mode 100644
index 0000000000..0add9779d9
--- /dev/null
+++ b/lib/active_job/version.rb
@@ -0,0 +1,8 @@
+require_relative 'gem_version'
+
+module ActiveJob
+ # Returns the version of the currently loaded ActiveRecord as a <tt>Gem::Version</tt>
+ def self.version
+ gem_version
+ end
+end