From 17b9f0a1f41d7fa672bea31cec190c61d322d3e7 Mon Sep 17 00:00:00 2001 From: Miro HronĨok Date: Jan 04 2021 12:07:07 +0000 Subject: Orphaned for 6+ weeks --- diff --git a/.gitignore b/.gitignore deleted file mode 100644 index b3cbfdf..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/to-object-path-0.3.0.tgz diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..5204a84 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +Orphaned for 6+ weeks diff --git a/example.js b/example.js deleted file mode 100644 index f9dbc81..0000000 --- a/example.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -var Base = require('base'); -var toPath = require('./'); - -function App(options) { - Base.call(this); - this.options = options || {}; -} - -Base.extend(App); - -App.prototype.option = function(key, value) { - var path = toPath('options', key); - if (arguments.length === 1) { - return this.get(path, value); - } - this.set(path, value); - return this; -}; - -var app = new App(); -app.option('foo.bar', 'baz'); - -console.log(app); -//=> {options: { foo: { bar: 'baz' }}} - -console.log(app.option('foo')); -//=> { bar: 'baz' } diff --git a/nodejs-to-object-path.spec b/nodejs-to-object-path.spec deleted file mode 100644 index 743b3fb..0000000 --- a/nodejs-to-object-path.spec +++ /dev/null @@ -1,100 +0,0 @@ -%{?nodejs_find_provides_and_requires} - -%global packagename to-object-path -%global enable_tests 1 - -Name: nodejs-to-object-path -Version: 0.3.0 -Release: 10%{?dist} -Summary: Create an object path from a list or array of strings - -License: MIT -URL: https://github.com/jonschlinkert/to-object-path -Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz -# The test files are not included in the npm tarball. -# Release not tagged in Github, pulling from master instead -Source1: https://raw.githubusercontent.com/jonschlinkert/to-object-path/master/test.js -Source2: https://raw.githubusercontent.com/jonschlinkert/to-object-path/master/example.js - - -BuildArch: noarch -%if 0%{?fedora} >= 19 -ExclusiveArch: %{nodejs_arches} noarch -%else -ExclusiveArch: %{ix86} x86_64 %{arm} noarch -%endif - -BuildRequires: nodejs-packaging -BuildRequires: npm(kind-of) - -%if 0%{?enable_tests} -BuildRequires: mocha -%endif - -%description -Create an object path from a list or array of strings. - - -%prep -%autosetup -n package -# setup the tests and examples -cp -p %{SOURCE1} . -cp -p %{SOURCE2} . - - -%build -# nothing to do - -%install -mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} -cp -pr package.json index.js \ - %{buildroot}%{nodejs_sitelib}/%{packagename} - -%nodejs_symlink_deps - -%check -%nodejs_symlink_deps --check -%{__nodejs} -e 'require("./")' -%if 0%{?enable_tests} -NODE_ENV=test %{_bindir}/mocha -R spec -%else -%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" -%endif - -%files -%{!?_licensedir:%global license %doc} -%doc *.md example.js -%license LICENSE -%{nodejs_sitelib}/%{packagename} - -%changelog -* Sat Aug 01 2020 Fedora Release Engineering - 0.3.0-10 -- Second attempt - Rebuilt for - https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue Jul 28 2020 Fedora Release Engineering - 0.3.0-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Wed Jan 29 2020 Fedora Release Engineering - 0.3.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Thu Jul 25 2019 Fedora Release Engineering - 0.3.0-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Fri Feb 01 2019 Fedora Release Engineering - 0.3.0-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Fri Jul 13 2018 Fedora Release Engineering - 0.3.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Thu Feb 08 2018 Fedora Release Engineering - 0.3.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Thu Jul 27 2017 Fedora Release Engineering - 0.3.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Sat Feb 11 2017 Fedora Release Engineering - 0.3.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Fri Jul 29 2016 Jared Smith - 0.3.0-1 -- Initial packaging diff --git a/sources b/sources deleted file mode 100644 index f06e65e..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -ed213d48acc6db7b01883673013ba398 to-object-path-0.3.0.tgz diff --git a/test.js b/test.js deleted file mode 100644 index 06cb747..0000000 --- a/test.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - -require('mocha'); -var assert = require('assert'); -var toPath = require('./'); - -describe('toPath', function() { - it('should create an object path from a list of strings:', function() { - assert.equal(toPath('foo', 'bar', 'baz'), 'foo.bar.baz'); - }); - - it('should create an object path from an array of strings:', function() { - assert.equal(toPath(['foo', 'bar', 'baz']), 'foo.bar.baz'); - }); - - it('should flatten array args', function() { - assert.equal(toPath(['foo', ['bar', ['baz']]]), 'foo.bar.baz'); - }); - - it('should create an object path from a list of arguments:', function() { - function foo() { - return toPath(arguments); - } - assert.equal(foo('foo', 'bar', 'baz'), 'foo.bar.baz'); - }); - - it('should create an object path from an array of arguments:', function() { - function foo() { - return toPath(arguments); - } - assert.equal(foo(['foo', 'bar', 'baz']), 'foo.bar.baz'); - }); - - it('should work when arguments is not the first value:', function() { - function foo() { - return toPath('options', arguments); - } - assert.equal(foo(['foo', 'bar', 'baz']), 'options.foo.bar.baz'); - }); - - it('should not use non-string values in the path', function() { - function foo() { - return toPath('options', arguments); - } - var fn = function() { - return; - }; - assert.equal(foo([fn, 'foo', 'bar', 'baz'], fn), 'options.foo.bar.baz'); - }); - - it('should create an object path from a mixture of arrays and strings:', function() { - assert.equal(toPath('foo', ['bar', 'baz']), 'foo.bar.baz'); - assert.equal(toPath(['foo'], ['bar'], ['baz']), 'foo.bar.baz'); - assert.equal(toPath(['foo'], ['bar'], ['baz']), 'foo.bar.baz'); - }); -});